Tag Archives: controls

Use Windows Forms controls to make multiple stacked expanders in C#

The example Use Windows Forms controls to make an expander in C# shows how to make simple expanders. By collapsing a Panel, the program allows the user to hide unwanted information. That frees up space on the form that the … Continue reading

Posted in animation, controls, multimedia | Tagged , , , , , , , , , , , , , | 5 Comments

Use Windows Forms controls to make an expander in C#

WPF, Silverlight, Metro, or whatever Microsoft is calling this stuff now days has some useful controls in the System.Windows.Controls namespace including Expander. An Expander displays a small arrow button and a panel where you can place other controls. When the … Continue reading

Posted in animation, controls, multimedia | Tagged , , , , , , , , , , | Leave a comment

Make transparent button images in C#

It seems like I keep writing this program because I need to make button images fairly often. I wanted to use a simple image with a transparent background for a button image. Unfortunately MSPaint doesn’t know how to save images … Continue reading

Posted in controls, drawing, graphics | Tagged , , , , , , , , , , , , , | Leave a comment

Make Ctrl+A select all of the text in a TextBox in C#

Often it’s convenient for the user to be able to press Ctrl+A to select all of the text in the TextBox that has the focus. Strangely that’s not the default behavior for the TextBox. Perhaps the TextBox doesn’t handle Ctrl+A … Continue reading

Posted in controls, user interface | Tagged , , , , , , , , , , | Leave a comment

Print a ListView control’s contents on multiple pages in C#

This example continues the following two examples: Print a ListView with large contents in C# Print the contents of a ListView control in C# Read those examples for an overview of the basic procedure. This example prints the contents of … Continue reading

Posted in controls, extension methods, printing | Tagged , , , , , , , , , , , , , | 4 Comments

Update a DataTable that is bound to a DataGridView in C#

The example Build a DataTable and bind it to a DataGridView in C# shows how you can bind a DataTable to a DataGridView to display data. This example shows how you can add new data to the display. When the … Continue reading

Posted in controls, database | Tagged , , , , , , , , , , , | Leave a comment

Print a ListView with large contents in C#

The example Print the contents of a ListView control in C# explains how to print the data in a ListView control when its View property is set to Details. One difficulty when printing this kind of data is that a … Continue reading

Posted in controls, drawing, graphics, printing | Tagged , , , , , , , , , , , , , , | Leave a comment

Print the contents of a ListView control in C#

The ListView control, like most controls, includes no support for printing. If you want to display a ListView control’s contents on a print out, you need to do all of the printing yourself. Unfortunately printing in C# is extremely flexible … Continue reading

Posted in controls, drawing, graphics, printing | Tagged , , , , , , , , , , , , | 24 Comments

Use a ProgressBar in C#

This example shows how to use a ProgressBar to show the progress of a long task. This is a very simple example that performs a synchronous task. I created the ProgressBar at design time. I left its Minimum property set … Continue reading

Posted in controls, user interface | Tagged , , , , , , , , , , | Leave a comment

Make pop buttons in C#

This example produces an interesting visual effect that I call “pop buttons.” The buttons grow and shrink when the mouse moves over them. The technique is remarkably simple and adds some extra interactivity to an otherwise ordinary program. The program’s … Continue reading

Posted in controls, fonts, user interface | Tagged , , , , , , , , , , , , , , , | Leave a comment