Windows Forms

How to Get all Forms and Open Form with Form Name in C#
By Tan Lee Published on Jul 27, 2017 13.27K

In C#, you can dynamically open or call a form by its name at runtime using reflection or by managing a collection of form names and their associated instances.

Read more
How to scan IP address in a network using C#
By Tan Lee Published on May 28, 2024 22.18K

To scan a network for IP addresses in a C# Windows Forms Application, you typically need to send ICMP Echo requests (ping) to each IP address in the network range you want to scan.

Read more
How to Minimize application to system tray in C#
By Tan Lee Published on May 28, 2024 17.54K

Minimizing an application to the system tray in a C# Windows Forms application involves a few steps.

Read more
How to Read Excel file in C# using OleDb
By Tan Lee Published on May 27, 2024 11.15K

To read an Excel file in C# without using Interop and to get Excel sheet names using OleDb provider, you can follow these steps.

Read more
How to Encrypt and Decrypt files using AES encryption algorithm in C#
By Tan Lee Published on Jul 16, 2024 27.11K

Encrypting and decrypting files using AES encryption in a C# Windows Forms application involves several steps.

Read more
How to zoom an image in C#
By Tan Lee Published on Jul 02, 2017 17.48K

To zoom an image in a PictureBox in C#, you can manipulate the Image property of the PictureBox by adjusting the SizeMode and scaling the image.

Read more
How to Print a Picture Box in C#
By Tan Lee Published on Jul 16, 2024 21.17K

Printing an image from a PictureBox control in a C# Windows Forms Application involves several steps, including setting up a PrintDocument, handling the print page event, and managing printing settings.

Read more
How to Extract the Icon Associated with a File in C#
By Tan Lee Published on Jul 16, 2024 7.57K

You can extract the icon associated with a file in a C# Windows Forms application using the Icon.ExtractAssociatedIcon method from the System.Drawing namespace.

Read more
How to dynamically add button and click event in C#
By Tan Lee Published on May 21, 2024 18.89K

In C#, you can dynamically add a button click event handler by creating a method that will handle the click event and then assigning this method to the button's Click event at runtime.

Read more
How to read .csv file in C#
By Tan Lee Published on Jul 16, 2024 31.36K

To read a CSV file into a DataTable and display it in a DataGridView in a C# Windows Forms application, you can follow these steps.

Read more