Z
ZhangZQ
Is it possible to get the HWND of a Form?
Thanks.
Thanks.
Maarten Struys said:Yes, here is a way to do it. First make sure to capture mouse / stylus input
on the form by setting the Capture property true. After that you can
P/Invoke to the Win32 API GetCapture, which returns a window handle.
this.Capture = true;
IntPtr hWnd = GetCapture();
this.Capture = false;
The following code shows you how to P/Invoke GetCapture
[DllImport("coredll")]
extern static IntPtr GetCapture();
--
Regards,
Maarten Struys, eMVP
PTS Software bv
www.opennetcf.org | www.dotnetfordevices.com
ZhangZQ said:Is it possible to get the HWND of a Form?
Thanks.