Tag Archives: ListBox

Save several images into Access in C#

The example Save images in an Access database in C# includes an Access database. Unfortunately if you save several images into the database and then open the database in Access, Access removes the images. It just doesn’t seem to understand … Continue reading

Posted in database, graphics, image processing, Office | Tagged , , , , , , , , , , , , , , , , , , | 1 Comment

Load images from an Access database in C#

The post Save images in an Access database in C# explains how to save images in an Access database. This post explains how to load images from an Access display them. Like previous examples, this program uses a SQL statement … Continue reading

Posted in database, graphics, image processing, Office | Tagged , , , , , , , , , , , , , , , , , | 2 Comments

Save images in an Access database in C#

This example shows how you can save images in an Access database. The example Use filenames stored in a database to display images in C# shows how to display images by saving the image file names in a database and … Continue reading

Posted in database, graphics, image processing, Office | Tagged , , , , , , , , , , , , , , , , , | 4 Comments

Use filenames stored in a database to display images in C#

The reason so many people ask how to store and retrieve images in a database is that it’s hard. You need to use a special data type such as the BLOB (Binary Large Object) or MEMO data type depending on … Continue reading

Posted in database, graphics, image processing, user interface | Tagged , , , , , , , , , , , , , , | 2 Comments

Initialize lists from databases without binding in C#

Note that this is a very manual way to initialize lists. Often you can display data more easily by using data binding. In this example, I added the Access database file Books.mdb to the project and set its “Copy to … Continue reading

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

Display tooltips for ListView items in C#

This example shows how to display different tooltips for the items in a ListBox. When you move the mouse over an item in the ListBox, the program uses the following code to display a tooltip for it. // Display a … Continue reading

Posted in controls | Tagged , , , , , , , , , , , , | 1 Comment

Sort partly numeric items in a ComboBox or ListBox in C#

The example Use a custom sort order for ListBox or ComboBox items in C# shows how to sort numeric values. This example uses the same basic approach: make an array of values, sort them as you want them displayed, and … Continue reading

Posted in algorithms, controls | Tagged , , , , , , , , , , , | 1 Comment

Display the number of checked items in a CheckedListBox in C#

The CheckedListBox control has a CheckedItems collection that holds references to the control’s currently checked items. You can use the collection’s Count property to determine the number of items checked. When the user checks or unchecks an item, the control … Continue reading

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

Use a custom sort order for ListBox or ComboBox items in C#

If you set a ComboBox and ListBox control’s Sorted property to true, the control sorts the items it contains. Unfortunately it sorts the items alphabetically. That means if the items are strings that begin with Roman numerals, they may be … Continue reading

Posted in algorithms, controls, user interface | Tagged , , , , , , , , , , , , , , , | 2 Comments

Sort ListBox or ComboBox items in numeric order in C#

If you set a ListBox control’s Sorted property to true, the control sorts its contents. Unfortunately it can only sort its contents in alphabetic order. If the items are numeric, that may not be what you want. This example sorts … Continue reading

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