07 2015 档案

查找窗体
摘要:函数功能:该函数获得一个顶层窗口的句柄,该窗口的类名和窗口名与给定的字符串相匹配。这个函数不查找子窗口。在查找时不区分大小写。函数型:HWND FindWindow(LPCTSTR IpClassName,LPCTSTR IpWindowName);参数:IpClassName :指向一个指定了类名... 阅读全文

posted @ 2015-07-19 14:47 vok_think 阅读(168) 评论(0) 推荐(0)

获取句柄,窗体文本
摘要://获取窗口标题 [DllImport("user32", SetLastError = true)] public static extern int GetWindowText( IntPtr hWnd,//窗口句柄 StringBuilder lpString,//标题 int nMax... 阅读全文

posted @ 2015-07-19 14:24 vok_think 阅读(528) 评论(0) 推荐(0)

API抓屏
摘要:需调用API函数需在开头引入命名空间 using System.Runtime.InteropServices;获取当前窗口句柄:GetForegroundWindow()[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling =... 阅读全文

posted @ 2015-07-19 13:37 vok_think 阅读(224) 评论(0) 推荐(0)

导航