私は何かプログラムをしてからしばらくしていました。他のアプリケーションを最大限に活用し、最小限に抑えるためにコードについて研究していました。だから私は何か基本的なものを見つけました。ここに私が持っているものがあります。私がやったFindWindowメソッドを生成したいと思っていました。今はすべてがうまく見え、メッセージを受け取って実行しようとしました。ここからどこに行くのかわからない。私が見つけた元のスレッドはこれを言及しなかった。他のアプリケーションを最大限に活用/最小化
private const int SW_SHOWNORMAL = 1;
private const int SW_SHOWMINIMIZED = 2;
private const int SW_SHOWMAXIMIZED = 3;
[DllImport("user32.dll")]
private static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);
static void Main(string[] args)
{
// retrieve Notepad main window handle
IntPtr hWnd = FindWindow("Notepad", "Untitled - Notepad");
if (!hWnd.Equals(IntPtr.Zero))
{
// SW_SHOWMAXIMIZED to maximize the window
// SW_SHOWMINIMIZED to minimize the window
// SW_SHOWNORMAL to make the window be normal size
ShowWindowAsync(hWnd, SW_SHOWMAXIMIZED);
}
}
private static IntPtr FindWindow(string p, string p_2)
{
throw new NotImplementedException();
}