Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

datagridview and old style scrollbars 1

Status
Not open for further replies.

VBmim

Programmer
Jun 25, 2001
361
BE
Hello,

I have inherited a .net application (c#) which was first written in vs2003 but was converted to vs2005 (I do not know how the conversion was made).
When I add a datagridview to one of the forms, the scrollbars still have the old windows look (not blue and rounded, but gray and square). When I add a checkboxcolumn to this datagridview, the checkbox also have an old style (mark is in black instead of green).

When I add a datagridview in a new project made in vs2005 everything is normal (datagridview is in full xp style).

Is there something I am missing? Some kind of setting I need to change in the old project?

Thanks in advance for your help!

Greetz

VBMim
 
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);


put those 2 lines above your Application.Run(new Form1()); statement in the

[STAThread]
static void Main()
{}

Method
 
Thank you for the (very) fast response! (and this on friday night)

I tested this and it worked.

Have a star.

Greetz

VBMim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top