[問題] 全螢幕
小弟寫了一個小遊戲
發現在全螢幕的時候會失去某些功能
想是我原本用了
[DllImport("user32.dll")]
public static extern IntPtr FindWindow(string lpClassName, string
lpWindowName);
[DllImport("user32.dll")]
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
IntPtr hWnd = FindWindow(null, Console.Title.ToString());
ShowWindow(hWnd, 0);
這段程式來隱藏主控台,但是到了全螢幕模式就會失效
主控台依然會跑出來 而且螢幕縮下來後 畫面就無法重製,視窗模式時沒這問題
就變成一定要在前面 一失去焦點整個程式就會當掉
請問原因是出在哪裡?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.115.53.61