How To Ideas | How To Articles | How To Tutorials


List/Grid C# Subscribe RSS feed of category C#

How To Delete A Registry Key Or Value Of A Key Using C#

Playing with Registry Keys might be dangerous for your Windows but if you are sure you want to delete a Registry key or one of its values, then here is a simple guide for you to achieve this using C# code. Instructions: Start by adding reference to Microsoft.Win32 namespace. using Microsoft.Win32; Now its important, if you want to delete a Registry Key, you have to reference its Parent Registry and… Read more »

How To Take Registry Access In Your C# Application

When you try to modify Registry keys either by adding some Registry Keys or Values or by editing existing ones, then you get an error about Access Denied. In that case you have to give your program more access to change Registry Entries. This is not about Administrative Privileges, but more Control over that. Let me explain this all to you. You can consider this that Registry Entries can have… Read more »

How To Create An Image Button In C#

You can easily embed an image in Button control, which makes your button looks attractive in Windows Form. But note that the image you want to embed into button must be a Resource file. Just follow the instructions and you will be able to create this kind of button for yourself. Instructions: Create a Button control on your Windows Form and then open its properties. In its properties, change the… Read more »

How To Read Value From Registry Key Using C#

In this tutorial, I will show you How To Read Registry Keys using C#. For this purpose, Microsoft has provided Registry and RegistryKey classes in Microsoft.Win32 class in .NET library. I will show you quick ways on how can we read Registry Keys and its Value, finding how many values a Registry Key have, and also how many sub keys are present in a particular key. Instructions: Add following namespace… Read more »

How To Force C# Application To Only Run As Administrator In Windows

If you are creating an Application which will target secured file on Client’s Computer, then your Application need to Run with Administrative Privileges, otherwise your Application will surely fail in its operation. Say, you want to create an Application which will try to edit or create Registry Entries or tries to access Program Files or any kind of Operating System (Windows) files, then your Application will fail, if it does… Read more »

How To Pass Command Line Arguments In C#

We can pass Command Line Arguments in C# which are handled as parameters in the Main function of our program. In this article I will show you how can we pass Command Line Arguments in a C# program and then how to access them in our program. In C#, You can only pass String type Arguments using Command Line. If you want to pass Arguments of other type, you have… Read more »

How To Find Startup Path Of Any Process Using C#

You can easily fetch the Startup path of any process working in your System using C#. You can only get Startup path of those processes which are currently running. So, In this article, I will talk about how can we get Startup path of currently running processes. Instructions: Add a Namespace in your application using system.diagnostics; Now Loop through all the running processes, and find the process whose path you… Read more »

How To Run Any Application Or Process Using C#

You can easily run any external application or program using C#. If you want to run any installed application, then you just need to know the name of executable file of that application. Otherwise you can run any process by knowing its Startup Path. Instructions: If you want to run an installed application, just find out its executable file name from properties of that application. Now in your C# application,… Read more »

How To Capture Information About A File In C#

You can view file properties by right clicking on any file and then choosing Properties from the right click context menu. In this article, I will show you a simple way which you can use to get most of the information present in that properties dialogue by using C#. I will use FileInfo class which enables us to get information about specific file. Instructions: Create a new FileInfo class instance… Read more »



© 6445 How To Ideas. All rights reserved.
Proudly designed by Theme Junkie.