LoginSignup
0
0

More than 1 year has passed since last update.

【C#】コンソールアプリケーション起動時にアプリケーションのウィンドウを非表示にしたい

Last updated at Posted at 2022-08-14
using System.Diagnostics;
using System.Runtime.InteropServices;

int SW_MINIMIZE = 0;
long WinMinHandle = 0;

[DllImport("user32.dll")]
static extern int ShowWindow(IntPtr handle, int command);

var p = Process.GetCurrentProcess();
WinMinHandle = ShowWindow(p.MainWindowHandle, SW_MINIMIZE);

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0