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