You can use the static FromHandle method of the Control class.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemwindowsformscontrolclassfromhandletopic.asp

Signature
Tim Wilson
.NET Compact Framework MVP
> You can use the static FromHandle method of the Control class.
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemwindowsformscontrolclassfromhandletopic.asp
Just stating the obvious: It must be a control in your app.
>> Is there any way to obtain a reference to a control instance if i have a
>> handle to that control?
Stoitcho Goutsev (100) - 08 Mar 2006 14:04 GMT
John,
As Nick pointed out it has to be a control in your application.
If you are looking at subclassing a window you can use NativeWindow class.

Signature
Stoitcho Goutsev (100)
>> You can use the static FromHandle method of the Control class.
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemwindowsformscontrolclassfromhandletopic.asp
[quoted text clipped - 3 lines]
>>> Is there any way to obtain a reference to a control instance if i have a
>>> handle to that control?