I need the intPtr for a form. Control.FromHandle(control) gives me the control from a handle, but I need the opposite–get the handle from a control. How do I do this?
I need the intPtr for a form. Control.FromHandle(control) gives me the control from a
Share
Try
Note: This will only work after the Handle for the control is created. There is a window of time in between when you create a control and when it is rendered to some degree where this may return IntPtr.Zero