Show Console NoActive

Implement ConsoleLogger.ShowLog()
This commit is contained in:
ChsBuffer
2021-05-29 16:41:17 +08:00
parent 1e5d357f34
commit f6dfb25e3f
2 changed files with 3 additions and 1 deletions

View File

@@ -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

View File

@@ -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);
}
}
}