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)
How do I convert LParam in a message from IntPtr to the Win32 type
Define the struct you want, for example RECT struct RECT { public int left, top, right, bottom; } Then use the Message.GetLPAram method RECT rc = (RECT)m.GetLParam( typeof(RECT) );
How do I add a ComboBox button to a toolbar
Michael Gold discusses this problem in How to create a ComboBox button in a toolbar in .NET on C# Corner.
How do I add and delete items from a ListBox
Check out Devinder Arora’s article Using ListBox Control in C# on C# Corner.