User Controls

You can create your own controls if you don't find what you want from the  list of predefined controls available in .NET. You may need to create your own  control…

Keyboard Events

When you want to handle events when pressing keys in the keyboard, you can handle the KeyPress, KeyDown, and KeyUp events. The KeyDown event occurs when a keyboard key is pressed down and the KeyUp event occurs after…

Mouse Events

You can use several special events to react to certain mouse interactions to the control. You have seen the Click event which occurs when the a control is clicked by the mouse…

Dynamically Adding Controls

Visual Studio offers you ways to design forms visually thanks to its Designer. You can simply drag and drop controls, drag them to specified locations, change their properties, and attach…

SaveFileDialog Control

The Save File Dialog control (System.Windows.Forms.SaveFileDialog) allows you to save or write data to a specified file. The dialog allows you to browse your file system and pick a directory, then type…

OpenFileDialog Control

The Open File Dialog control (System.Windows.Forms.OpenFileDialog) allows you to open and read file contents such as texts from text files. The dialog allows you to browse your file system and pick a…

FolderBrowserDialog Control

The Folder Browser Dialog control (System.Windows.Forms.FolderBrowserDialog) allows you to browse for a directory in your system. The control uses a tree view to show all the folders. The Browser shows the Desktop…

FontDialog Control

The Font Dialog control (System.Windows.Forms.FontDialog) is a handy control for selecting different kinds of font and font-related properties. Using the Font Dialog, you can change the font type, style, size, color, add…

ColorDialog Control

The Color Dialog (System.Windows.Forms.ColorDialog) is used when you want to pick different colors. For example, when you want to pick a color of the font or a background color for the form,…

Dialogs

Dialogs are windows that have a certain specific function such as saving or opening a file, choosing a color, or printing a document. The .NET framework offers the dialog controls which…

ToolStripContainer Control

The ToolStrip Container control (System.Windows.Forms.ToolStrip Container)  serves as a container for toolbars. With this control, you can arrange and  change the positions of the toolbars inside this container. The  ToolStrip Container is…

Creating Toolbars

A toolbar contains buttons and other components that serve as menu commands to the user. Like the menu, toolbars are also seen in numerous famous applications such as the Microsoft Office 2003…

Using the TabIndex Property

You can cycle the focus of each control by pressing the tab key on the keyboard. Each control has a TabIndex property which indicates the order each control will get focus when…

Docking Panels

The Dock property allows you to dock the control to any of the edges of the form or its container. It's another way to make your controls intact when you resize the…