Category Archives: controls

Move and resize polygons in WPF and C#

The example Move and resize multiple shapes in WPF and C# shows how to resize some shapes in WPF, but it doesn’t let you resize polygons. You determine the position and size of most shapes by giving their left, top, … Continue reading

Posted in controls, graphics, wpf, XAML | Tagged , , , , , , , , , , , | 2 Comments

Move and resize multiple shapes in WPF and C#

The example Move and resize multiple rectangles in WPF and C# shows how to let the user move and resize multiple rectangles in a WPF program. This example extends that one to let you move and resize multiple shapes. See … Continue reading

Posted in controls, graphics, wpf, XAML | Tagged , , , , , , , , , , , | 7 Comments

Use big toolstrip buttons in C#

This example shows how you can make big toolstrip buttons. It also shows how to make buttons act as comboboxes that let you select images. At design time, I created the toolstrip and added the button with the flower on … Continue reading

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

Let the user drag ListBox items in C#

This example uses drag-and-drop to allow the user to drag ListBox items from one position to another. To use the program, right-click on an item and then drag it to hits new position. If you drag an item beyond the … Continue reading

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

Let the user arrange ListBox items in C#

This example demonstrates one way that you can let the user arrange ListBox items. To rearrange the items, the user can click on an item and then use the program’s buttons to move the item to the top of the … Continue reading

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

Change a DataGridView entry when the user double-clicks a cell in C#

This post is in response to the following question: Respected Sir, I need help on how can i change the datagridview cell value by double click on that cell. Let say cell contain value ā€˜Nā€™ when i double click it … Continue reading

Posted in controls, database, user interface | Tagged , , , , , , , , | 5 Comments

Let the user drag pictures in a picture list in C#

The post Improve the picture list in C# showed how you can let the user add, remove ,and rearrange images in a picture list. To rearrange the list, the user right-clicks on a picture and selects Move Left or Move … Continue reading

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

Improve the picture list in C#

My post Make a picture list in C# explained how you can make a picture list that lets the user add, remove, and rearrange pictures. This post adds a small improvement. The previous example displayed images in PictureBox controls with … Continue reading

Posted in controls, lists, user interface | Tagged , , , , , , , , | 1 Comment

Make a picture list in C#

This example shows how to build a picture list that lets the user add, remove, and rearrange pictures at run time. If you right-click between two pictures or to the left or right of all of the pictures, the program … Continue reading

Posted in controls, lists, user interface | Tagged , , , , , , , , | 1 Comment

Load Excel records into a DataGridView in C#

This example shows how you can load Excel records into a DataGridView control. You can use similar techniques to load Excel data into other controls such as other kinds of grid controls or a TreeView control. This example uses the … Continue reading

Posted in controls, database, Excel, interoperability | Tagged , , , , , , , , , , , , | 10 Comments