Use of this code? Where can we use this?

Posted by Sridevi under C# on 4/19/2012 | Points: 10 | Views : 1095 | Status : [Member] | Replies : 2
Could anyone explain what is the purpose of this code?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace WindowsFormsApplication2
{
static class Program
{

[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}



Regards,
Sridevi.

Sridevi


Responses

Posted by: Leila on: 4/19/2012 [Member] Starter | Points: 25

Up
0
Down
Main is the first function that executes when running the application.
It is used in Windows forms application

Thanks,
Leila

Sridevi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Dotnetrajanikanth on: 4/19/2012 [Member] Starter | Points: 25

Up
0
Down
Sridevi,

Actually there is a difference between text rendering in .net framework 1.X and version 2.x and above. this is mainly used to make the text rendering uniform in both the frame works. 1.x uses graphic class to render the text and 2.x and above uses text rendering class so this makes both compatible and helps to view the text as same in 1.x and 2.x above versions.

____________
www.flickr.com/photos/psdesigner/

Sridevi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response