摘要:
如何找到桌面上报错的窗口,不管是父窗口还是子窗口,而且获得它的出错信息呢?主要是利用API函数:[DllImport("user32.dll")]public static extern int FindWindowEx(int hwndParent, int hwndChildAfter,string lpszClass, string lpszWindow);[DllImport("user32.dll")]public static extern int FindWindow(string strclassName, string strWindo 阅读全文
posted @ 2012-12-13 22:20
曾是土木人
阅读(7002)
评论(0)
推荐(0)
摘要:
FindWindow()函数的用法。要在C#里使用该API,写出FindWindow()函数的声明: [DllImport("coredll.dll", EntryPoint = "FindWindow")] private extern static IntPtr FindWindow(string lpClassName, string lpWindowName); 这个函数有两个参数,第一个是要找的窗口的类,第二个是要找的窗口的标题。在搜索的时候不一定两者都知道,但至少要知道其中的一个。有的窗口的标题是比较容易得到的,如"计算器" 阅读全文
posted @ 2012-12-13 20:01
曾是土木人
阅读(7194)
评论(1)
推荐(1)

浙公网安备 33010602011771号