{love to code?}

July 5, 2009

Converting console application to windows application – C++/CLI

Filed under: C++/CLI — navaneethkn @ 4:46 PM
Tags: , ,

Have you ever needed to convert a console application to windows application?

Recently, I worked on an application which was created to run on console, but later decided to move to windows application. To make it a windows forms application, you only have to add new windows form to the project. VS will add all necessary references automatically.

Modify your main method like, (more…)

July 3, 2009

Using application configuration file (app.config) with C++/CLI applications

Filed under: C++/CLI — navaneethkn @ 4:15 AM
Tags: , ,

.NET applications uses app.config file to keep the application configuration entries like database connection strings, logging information etc.  Using Visual Studio, you can add a new app.config file to your application. In C# and VB.NET projects, app.config will be copied automatically to the output directory and it will be named like <Application>.exe.config where <Application> is your executable name. ConfigurationManager is a helper class which provides a neat interface to the contents of app.config.

With the above information, let us write a simple application which reads AppSettings node from the application configuration file. (more…)

Blog at WordPress.com.