Author Archives: DEEPAK SHARMA

Visual Studio Tips and Tricks: How to set Tab Order of Windows Forms controls in Visual Studio

Introduction In this post I will explain how to set tab orders of Windows Forms controls in Visual Studio Description Tab order of controls is the order in which a control is accessed using Tab key. We can easily set tab order of controls on a form in Visual Studio Add your controls on the… Read More »

How to write data of an SQL Server table to an XML file using C#

Introduction In this article I will discuss how to write data of an SQL server table to an XML file using C# Description I have an Employees table in Northwind database with some sample data that we are going to write in an XML file. You can download Northwind and pubs sample databases from here… Read More »

How to fix MySqlException-“Packets larger than max_allowed_packet are not allowed.” while inserting BLOB data in MySQL database using C#

Introduction In my previous articles I explained How to save images in MySQL database using C# in Windows Forms application and How to retrieve images from MySQL database and display as a slide show in Windows Forms application using C#. While inserting images more than 1 MB in MySQL BLOB column from C#, I got an… Read More »

How to retrieve images from MySQL database and display as a slide show in Windows Forms application using C# and VB.NET

In this article I will explain how to retrieve images stored in BLOB field of MySQL database and display as a slide show in Windows Forms application using C# Download source code Introduction In previous article I explained how to save images in Windows Forms application using C#. In this article I will explain how… Read More »

How to save images in MySQL database using C# and VB.NET in Windows Forms application

Introduction In this article first we will create a table in MySQL database and then we will use a Windows Forms application to save image in the database Description Create a table in MySQL database using MySQL browser as following to store images For storing images you can use any of the BLOB (Binary Large… Read More »

How to show NotifyIcon in Windows Forms application using C#

In this article I will explain how to show NotifyIcon in Windows Forms application using C# Introduction In this article I will explain how to show notification in Windows Forms application using NotifyIcon component of Windows Forms NotifyIcon NotifyIcon is a component in Windows Forms that is used to notify users by displaying an icon… Read More »

How to customize default ContextMenu of a TextBox control in Windows Forms application using C#

In this article I will explain how to customize default ContextMenu of a TextBox control in Windows Forms application using C# Introduction In previous article I explained How to create Context Menu in Windows Forms application using C#. In this article I will explain how to customize default ContextMenu of a TextBox control and add… Read More »

How to create Context Menu in Windows Forms application using C#

In this article let us see how to create Context Menu in Windows Forms application using C# Introduction In this article we will see how to create Context Menu or Popup Menu or Shortcut menu in Windows Forms application with ContextMenuStrip control using C# Context Menu Context menu is group of commands or menu items… Read More »

Drag and Drop from DataGridView to ListBox in a Windows Forms application

In this article I will explain how to drag and drop from a DataGridView control to a Listbox control Download source code Introduction In this article I will explain how to drag selected rows from a DataGridView control onto a ListBox control in a Windows Forms (WinForms) application using C#   Step 1: Create a… Read More »

Working with Array in C#

In this post I will explain how to work with Array in C# Array in C# is a collection of objects of same data type. An Array is declared by appending square brackets with the data type. Array supports zero based indexing. First element of an array is stored at 0 index Declaring and initializing… Read More »