1
我試圖將消息發送到WPF應用程序有它最小化,然後恢復發送信息給WPF應用程序
我做
//Import the SetForeground API to activate it
[DllImportAttribute("User32.dll")]
private static extern IntPtr SetForegroundWindow(int hWnd);
[DllImportAttribute("User32.dll")]
//private static extern IntPtr SendMessage(int hWnd, int Msg, bool wParam, int lParam);
private static extern IntPtr SendMessage(int hWnd, uint Msg, UIntPtr wParam, IntPtr lParam);
....
SetForegroundWindow(hWnd); //Activate it
//in here I minimize the window manually
SendMessage(hWnd, 0x0018, (UIntPtr)0, (IntPtr)0); //trying to restore
它不工作
任何想法
你用過間諜++檢查窗戶是否接收消息? – dlev 2011-05-11 16:24:51
是的,我有,我看到它... - 它說WM_SHOWWINDOW fshow:false fuStatus:0我以爲我可能有一個參數錯了,但我希望它會盡量減少它不會 – Jeff 2011-05-11 16:32:00