怎么获取外部程序窗体的句柄?前提外部程序启动的窗体在任务栏不显示
如何获取外部程序窗体的句柄?前提外部程序启动的窗体在任务栏不显示!
1、用FindWindow与FindWindowEx API测试没有取到句柄!
Win32API.FindWindow(null,"frmLogin") 这种方式取不到,只能取在任务栏显示的;
------解决方案--------------------
1、用FindWindow与FindWindowEx API测试没有取到句柄!
Win32API.FindWindow(null,"frmLogin") 这种方式取不到,只能取在任务栏显示的;
------解决方案--------------------
- C# code
[DllImport("User32.dll", EntryPoint = "FindWindow")] private static extern int FindWindow(string lpClassName, string lpWindowName); int intHWnd = FindWindow(null, "外部窗口");
------解决方案--------------------
确认是不是 'frmLogin'
------解决方案--------------------