I’ll show you how to make a countdown with C# and using the timer control. To do this, we create a new Windows Forms project and switch to the code view of the form. For this example, we need some global variables. You...
Tag - C# Windows Form Examples
C# Program to Concatenate Two or More Text Box Values
In this example, I’ll show you How to concatenate multiple textboxes values in C# Windows Form Application. Concatenate Two Textbox into an Another Textbox C# Code (Button1_Click) C# private void button1_Click(object...
C# Using BackgroundWorker
BackgroundWorker In C# In the case of time-consuming tasks (eg reading a very large text file), it can happen that the form freezes, so to speak. This happens because everything runs in one thread and so the form has no chance to...
WinForms C# Pass Variable Between Forms
This tutorial allows you to retrieve a variable from one form and display it in a textbox on another form. So you will learn in this tutorial how to pass data from one form to another in C# Create Visual Studio Form project, then...
Transfer Selected Items From CheckedListBox to Another CheckedListBox in C#
In this C# example, I’ll show you How to move data from one CheckedListBox to another CheckedListBox . In our first approach, we are going to create CheckedListBox and Button Controls at design-time using the Forms...
Create Simple Login Form in C# With Sql Server Database
Here in this article, I will show you how to create a login form in C# and connect with SQL Server database in 4 steps. Step 1: Open Sql Server, click on a New Database. Give database name as “dbLogin” and create a Table in...
C# – Insert Listbox Items to Database
Here in this article, I will show you How to insert listbox items to MS Access Database. Step 1: Open MS Access, click on a Blank Desktop Database. Give the database name “dbTest.accdb“. and then click Create.
Reading Excel file in C# Windows Form Application
Excel files are widely used by people all over the world for various tasks related to organization, analysis, and storage of tabular data. Since excel files are so common, we sometimes need to read data from an excel file or...
C# Get the Sum of the Items in a Listbox
In this tutorial, we will getting sum of all numbers in the listbox. First, We’ll design the form. Source Code: (Button1_Click) private void button1_Click(object sender, EventArgs e) { decimal sum = 0; for(int...
Change the Color of ProgressBar in C#
In this article, We will create a simple Login Form and we will change the color of the ProgressBar. If entered password lower then 5 characters, we will set the color of progress bar as red . And if entered chars are between 5...