VS 2005: Gradient background colour lost after going from beta 2 -> release

S

stretch

Hi,

I have been playing round with the beta of VS 2005 and built a simple
winforms app. I installed the released version of VS 2005 (after
following the full uninstall procedures given on MS site for beta 2)
and one small but annoying issue has come up - the default backgroud
colour of my controls has gone back to the standard ugly khaki-grey
colour. While using the beta, it was a light khaki with a gradient
which gave the control a nice professional look.

I know this feature can be replicated in code, but I was under the
impression this style would be the default for controls in the .NET 2.0
framework.

Is there some way to force my app to use that colour scheme by default?
It was happening in the VS 2005 beta (I cant remember the version of
the .NET framework i was using, but it was also a beta) so I am at a
loss why Microsoft took this feature out for the release.

It makes tab pages look like crap - I am hoping this is simply a
configuration issue.

Regards,
Steve
 
G

Guest

Make sure that you are calling the Application.EnableVisualStyles(); method.
Look at the “main†method in Program.cs.

static class Program
{
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.Run(new MainForm());
}
}

Alexey Borzenkov
 
S

stretch

Hi Alexey,

I do call that in the main method - in fact the XP-style visuals are
still there. Its just the background coulour thats changed. I was
hoping there is an easy way to get this feature back rather than
overriding the Paint event everywhere.

Regards,
Steve
Make sure that you are calling the Application.EnableVisualStyles(); method.
Look at the "main" method in Program.cs.

static class Program
{
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.Run(new MainForm());
}
}

Alexey Borzenkov

stretch said:
Hi,

I have been playing round with the beta of VS 2005 and built a simple
winforms app. I installed the released version of VS 2005 (after
following the full uninstall procedures given on MS site for beta 2)
and one small but annoying issue has come up - the default backgroud
colour of my controls has gone back to the standard ugly khaki-grey
colour. While using the beta, it was a light khaki with a gradient
which gave the control a nice professional look.

I know this feature can be replicated in code, but I was under the
impression this style would be the default for controls in the .NET 2.0
framework.

Is there some way to force my app to use that colour scheme by default?
It was happening in the VS 2005 beta (I cant remember the version of
the .NET framework i was using, but it was also a beta) so I am at a
loss why Microsoft took this feature out for the release.

It makes tab pages look like crap - I am hoping this is simply a
configuration issue.

Regards,
Steve
 
S

stretch

For those that run into the same problem:

tabpage.UseVisualStyleBackColor = true.

For some reason this property does not need to be set in beta 2. If you
drop a tab control onto the designer and check the compiler generated
code, you will see this property explicitly enabled.
Hi Alexey,

I do call that in the main method - in fact the XP-style visuals are
still there. Its just the background coulour thats changed. I was
hoping there is an easy way to get this feature back rather than
overriding the Paint event everywhere.

Regards,
Steve
Make sure that you are calling the Application.EnableVisualStyles(); method.
Look at the "main" method in Program.cs.

static class Program
{
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.Run(new MainForm());
}
}

Alexey Borzenkov

stretch said:
Hi,

I have been playing round with the beta of VS 2005 and built a simple
winforms app. I installed the released version of VS 2005 (after
following the full uninstall procedures given on MS site for beta 2)
and one small but annoying issue has come up - the default backgroud
colour of my controls has gone back to the standard ugly khaki-grey
colour. While using the beta, it was a light khaki with a gradient
which gave the control a nice professional look.

I know this feature can be replicated in code, but I was under the
impression this style would be the default for controls in the .NET 2.0
framework.

Is there some way to force my app to use that colour scheme by default?
It was happening in the VS 2005 beta (I cant remember the version of
the .NET framework i was using, but it was also a beta) so I am at a
loss why Microsoft took this feature out for the release.

It makes tab pages look like crap - I am hoping this is simply a
configuration issue.

Regards,
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top