Tag Archives: DotNet

Best and Easy way to Convert CSV File to Excel File Using C#

By | 1st November 2019

The best and easiest way to convert csv file to excel file is here. This is the method I implemented and it is working fine. Hope you all implement it.   private void Convert_CSV_To_Excel(string filename)         {             // Rename .csv To .xls             System.IO.File.Move( filename , filename .Replace(“.csv”, “.xls”));             var _app = new MX.Application();             var _workbooks = _app.Workbooks;… Read More »

How to disable the close button in windows form application in C#

By | 23rd October 2019

Hi Guys Here I will show you how to disable the close button in windows form application in C# Declare the constant variable : private const int CP_NOCLOSE_BUTTON = 0x200; Now, define protected override method as shown: protected override CreateParams CreateParams { get { CreateParams myCp = base.CreateParams; myCp.ClassStyle = myCp.ClassStyle | CP_NOCLOSE_BUTTON; return myCp;… Read More »

Class Definition and Using Select statement adding the data to the predefined list

By | 26th September 2019

Happy Coding Guys 🙂 Here am defining the structure of the class and declaring the list of that particular class. I am using a select statement and adding the data returned from the database to that particular list. Defining Connection string in Notepad file and common method to connect to multiple databases How to change… Read More »

Defining Connection string in Notepad file and common method to connect to multiple databases

By | 23rd September 2019

Happy Coding Guys 🙂 The below is a notepad (.ini) file to define the connection string Below is the method to connect to multiple databases How to check if directory exists in specified path and then create directory How to Open dynamically specific extension file from a directory

How to track the deleted folders in Windows Explorer in Windows Forms Application in C# .net

By | 19th August 2019

  You can track the deleted folders in Windows Application by using FileSystemWatcher Class. 1) First add System.IO.FileSystem.Watcher.dll  library. 2) Next Write the code as shown below. 3) If you need to track all the subdirectories which are deleted. The below code is important.   fileSystemWatcher.IncludeSubdirectories = true;   4) Write the source code as… Read More »