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...
Tag - C# Windows Form Examples
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...
Display Content of Textbox on a Label Using Button in C#
In this tutorial, i’ll show you how To Display Content of Textbox on a Label Using Button in C#. Now design this form with the label, text box and button controls. Form Design: C# Code: C# public partial class Form1 : Form...
Fill ComboBox with Distinct Value From SQL Database using List in C#
In this tutorial, we’ll learn How to populate ComboBox with distinct value from database using List in C#. C# Code: C# private void Form1_Load(object sender, EventArgs e) { using (SqlConnection con = new SqlConnection("Data...
LINQ Average Example using C# Form
In this example, I will show how to average row value using LINQ in C# Windows Form. I have shown a very simple example to average total value from list. I have created a two classes one student and another student Mark to...
Formatting a Textbox (Phone Numbers, Mobile Numbers, Emails, Date) in C#
In this tutorial, we will learn how to use the MaskedTextBox control in C#. A MaskedTextBox control provides a validation mechanism for user input on a Form. For example, if you want a TextBox to accept a date in mm/dd/yyyy...
C# Programming , Add, Change, Remove, and Clear Items in Listbox Using C#
Creating simple program to add, remove and clear items from a ListBox in C#. Today, we will do a program to add, change, remove and clear items from a list box. We will use a text box for adding and changing items in list box. We...
C# SortedList Examples
In C#, SortedSet is a collection of objects in sorted order. It is of the generic type collection and defined under System.Collections.Generic namespace. It also provides many mathematical set operations, such as intersection...
SQL Connection using a Class in C#
In this example, we’ll learn CRUD Operations in C# Windows Application using Class. Step 1: How to connect database from Windows application? We will add database connection easily in windows application in simple steps as...
Create a Chess Board using C# Windows Forms
In this example, I’ll show you How to create a chess board using Windows Form App. C# Code: C# using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using...