public static extern IntPtr GetCapture();
[DllImport( " coredll.dll " )]
public static extern IntPtr FindWindow(String lpClassName, String lpWindowName);
// ----下面的this的基类为Control----
// 方法1
this .Text = " FindMe " ;
IntPtr hwnd1 = FindWindow( null , " FindMe " );
// 方法2
this .Capture = true ;
IntPtr hwnd2 = GetCapture();
this .Capture = false ;
http://www.pocketpcdn.com/articles/dotnetcf_hwnd.html
http://msdn.microsoft.com/zh-cn/library/aa497275.aspx
--------------------------------------------------
李森 – listen |
声明: Announce: |