How do I get an HWND for a form

See the Control.Handle property which returns the HWND. Be careful if you pass this handle to some Win32 API as Windows Forms controls do their own handle management so they may recreate the handle which would leave this HWND dangling. (from [email protected] on microsoft.public.dotnet.framework.windowsforms)

If I have a user control and a designer, how can I debug the designer

You need to use a second instance of VS.NET to debug the one that’s running the code. 1) Put your control on a form in VS.NET 2) Start a 2nd Vs.Net 3) Choose the Debug menu >> Processes … 4) Double click ‘devenv.exe’ and choose ‘Common Language Runtime’ as the types of debugging 5) Open your code file, set your breakpoint, and you’re debugging. (from [email protected] on microsoft.public.dotnet.framework.windowsforms)