Tag: Application

How to Get the Application’s path in Windows or Console Application in C#?

There are times when you want to retrieve the application’s path where the exe is running to get access to another file or accessing the configuration file etc. Below is a sample program that demonstrates how one can retrieve the Application’s path in Windows or Console Application in C#. How to Get the Application’s path in Windows or Console Application in C#?

How do Specify the Exit Code of Console Application in .NET?

There are times when you want to specify the exit code from the Main function for example when working on the Console Application in .NET . How do Specify the Exit Code of Console Application in .NET? You can use the Environment.Exit to specify the exit code in the Console Application.

How to send email in Windows Phone 8 Application Programatically using C#?

The Windows Phone 8 SDK provides the EmailComposeTask which can be used to send email in Windows Phone 8 Programatically. The EmailComposeTask launches the Email Compose screen which lets the user to verify the email content and tap on the “send” button to send email. How to send email in Windows Phone 8 Application Programatically using C#? Below is a sample code snippet that demonstrates…

How to Make Single Instance Application for VB.NET Application in Visual Studio 2012?

When developing a Windows Application in VB.NET, there are times when you want to make your application as single instance application. You can do that easily with just few steps in your VB.NET project. How to Make Single Instance Application for VB.NET Application in Visual Studio 2012? Launch Visual Studio 2012 and Open your VB.NET Windows Application. Right Click on the project in the Visual…

How to force the .NET Winforms Application to run as Administrator in Windows 8?

The Winforms or the Console Application developed in .NET can be made to run in the Administrator mode once the application is installed on client machine. You can do this by setting the requestedExecutionLevel to the requireAdministrator mode in the application manifest file. How to force the .NET Winforms Application to run as Administrator in Windows 8 ? To force the .NET Winforms app to…

What is the Use of Capabilities in Windows Phone Application Manifest File ?

When working with the Windows Phone 8 development , you would have noticed the Windows Phone Application manifest file which includes an tab called “Capabilities” . What is the Use of Capabilities in Windows Phone Application Manifest File ? The Windows Phone Application Manifest File contains the metadata for your app. The capabilities in WP8 provides the users with information about the app and which…

How to Enable or Disable Visual Styles in your VB.NET Winforms Application?

You can enable or Disable the Visual Styles in your VB.NET Winforms Application by following the below steps. How to Enable or Disable Visual Styles in your VB.NET Winforms Application? 1. Launch Visual Studio 2013 and Open your VB.NET Project. 2. Right Click on the project and open the Project Properties. 3. In the Project Properties Dialog, Select the “Application” menu in the left sidebar…

Application.Run in Windows Forms Application

When a new Windows Forms Project is created , you would see the sourcecode similar to the below sample in the Program.cs using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; namespace WindowsFormsApplication1 { static class Program { [STAThread] static void Main() { Application.Run(new Form1()); } } } What does the Application.Run do ? The Application.Run will run the standard application message loop in the current…