mirror of
https://github.com/netchx/netch.git
synced 2026-03-18 18:13:21 +08:00
Show Console NoActive
Implement ConsoleLogger.ShowLog()
This commit is contained in:
@@ -386,7 +386,7 @@ namespace Netch.Forms
|
||||
{
|
||||
var windowStyles = (User32.WindowStyles)User32.GetWindowLong(Netch.ConsoleHwnd, User32.WindowLongFlags.GWL_STYLE);
|
||||
var visible = windowStyles.HasFlag(User32.WindowStyles.WS_VISIBLE);
|
||||
User32.ShowWindow(Netch.ConsoleHwnd, visible ? ShowWindowCommand.SW_HIDE : ShowWindowCommand.SW_SHOW);
|
||||
User32.ShowWindow(Netch.ConsoleHwnd, visible ? ShowWindowCommand.SW_HIDE : ShowWindowCommand.SW_SHOWNOACTIVATE);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Netch.Interfaces;
|
||||
using System;
|
||||
using Vanara.PInvoke;
|
||||
|
||||
namespace Netch.Models.Loggers
|
||||
{
|
||||
@@ -47,6 +48,7 @@ namespace Netch.Models.Loggers
|
||||
|
||||
public void ShowLog()
|
||||
{
|
||||
User32.ShowWindow(Netch.ConsoleHwnd, ShowWindowCommand.SW_SHOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user