Obtaining hWnd from a form - how ?

  • Thread starter Thread starter Susan Baker
  • Start date Start date
S

Susan Baker

I need to pass the handle of my window (WinForm in C#) to a C library.
The WinForm does not apear to expose this property - how may I access it ?

MTIA
 
Susan Baker said:
I need to pass the handle of my window (WinForm in C#) to a C library. The
WinForm does not apear to expose this property - how may I access it ?

MTIA

What about the Handle property?

Willy.
 
try this:

[DllImport]
static public extern void myCFunction(IntPtr hWnd);
......
myCFunction(myForm.Handle);
 
Back
Top