How do I prevent my Component from becoming visible in the VS.Net Toolbox?
Use the ToolboxItem(false) attribute on your Component/Control class. This will prevent it from appearing in the Toolbox. [ToolboxItem(false)] public class MyComponent : Component{..}
How can I get the screen resolution of my display
Use this property: System.Windows.Forms.Screen.PrimaryScreen.Bounds
How can I listen for certain keys at the Form level irrespective of which Control has the focus?
When the Form.KeyPreview property is set to true, the Form’s KeyPress, KeyDown and KeyUp events will be fired even before the Control with the focus’ corresponding events. You may choose to forward these message to the Control after processing them in the Form’s event handlers (this happens by default) or set the e.Handled property to true (in the event argument) to prevent the message from being sent to the Control with focus.
How do you clear the contents of a list box?
You have to access the Items of the ListBox using the Items property and clear (or otherwise operate on the items) these. this.lb1.Items.Clear();
When using the ContextMenu on multiple Controls, how do I know on which Control the right click was performed?
The ContextMenu.SourceControl property will specify the latest Control on which the context menu was shown.