How to get form handle

G

GAEL

I would like to know a function that returns the handle
of a form. The type has to be HWND.

I know that there is a funtion (this.Handle) that gives
me a handle of type IntPtr but the type I need is HWND.

How can I do?
 
A

Austin Ehlers

I would like to know a function that returns the handle
of a form. The type has to be HWND.

I know that there is a funtion (this.Handle) that gives
me a handle of type IntPtr but the type I need is HWND.

How can I do?

Well, isn't HWND just a void* ? Just use the instance member function
IntPtr.ToPointer() to get a void*.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top