Introduction: In C# applications, integrating data from a MySQL database into user interface components, such as a ComboBox, is a common task. This tutorial aims to demonstrate the process of connecting to a MySQL database...
Tag - C# Windows Form Examples
Filtering DataView With Multiple Columns in C#
In C#, you can use the DataView.RowFilter property to filter a DataView based on multiple columns. The RowFilter property is a string that represents the filter criteria for the DataView. The code you provided is an example of...
Change the Color of a Cell or Row in a DataGridView Based on a Condition
To change the color of a cell in a DataGridView based on a condition, you can use the CellFormatting event of the DataGridView. This event is raised when a cell is about to be painted, and allows you to customize the appearance...
Change the Color of an Item in a ListBox in C#
To change the color of an item in a ListBox in C#, you can use the DrawItem event of the ListBox. This event is raised when an item in the ListBox is drawn, and allows you to customize the appearance of the item. Here is an...
Queue Class in C# with Examples
In this article I’ll show you the Queue<> class and the various methods and properties of it. Queue reрresents а first-in, first оut соlleсtiоn оf оbjeсt. It is used when yоu need а first-in, first-оut ассess оf items...
Set Picture at RunTime in C# with Example
In this tutorial, i’ll show you How to set an image to picturebox when button clicked. You can programmatically set the image displayed by a Windows Forms PictureBox control. Set the Image property using the FromFile method...
How to Set a Button Background as an Image in C#
The Image property of a Button control is used to set a button background as an image. The Image property needs an Image object. The Image class has a static method called FromFile that takes an image file name with full path and...
How to Change Background and Foreground Color of a Button Control in C#
BackColor and ForeColor properties are used to set background and foreground color of a Button respectively. If you click on these properties in Properties window, the Color Dialog pops up. Alternatively, you can set background...
ProgressBar in C# with Examples
In this tutorial, we’ll learn How to use a ProgressBar in C# Form Application. A ProgressBar control is used to represent the progress of a lengthy operation that takes time where a user must wait for the operation to be...
How To Add Newline in a TextBox control in C#
In this tutorial, we’ll learn How to add newline in a TextBox Control. Normally, when you want to add newline to a string you can use’\n’ for adding new lines like below. Example: C# using System; using System...