Solved

c# winforms application button are looking 'wrong'

Posted on 2013-01-30
6
340 Views
Last Modified: 2013-02-02
Hi

I have just done a test-run to deploy the application I am developing on the end users machine.  Took a while to work out what was needed but got there in the end.

The application runs fine on the target machine (windows xp pro) but the buttons look wrong, they are of the old vb6 style, and have the same colour as whatever background they are placed on... weird... how can I get the 'nicer' vs2010 buttons to display?
0
Comment
Question by:cycledude
  • 4
  • 2
6 Comments
 

Author Comment

by:cycledude
ID: 38834917
ah... could it be the windows setup preventing the 'modern' buttons..?  I notice the start menu is of the windows 98 'grey' varietyrather than the windows xp green...
0
 
LVL 25

Expert Comment

by:Luis Pérez
ID: 38835415
Maybe your application is simply applying the current system theme.

Anyway, you can try this:
Application.EnableVisualStyles();

Put this line of code as the first executable line of your application.

Hope that helps.
0
 

Author Comment

by:cycledude
ID: 38835443
thanks

I will try that ;o)
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

Author Comment

by:cycledude
ID: 38835457
just had a look and it was already in there, along with :

Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new mdiMain());

Open in new window

0
 
LVL 25

Accepted Solution

by:
Luis Pérez earned 500 total points
ID: 38835466
Then you can't do anything. As I said, your application is applyng themes and standard styles, but in some computers those styles will tell the application to draw the controls in that old-looked style.
0
 

Author Closing Comment

by:cycledude
ID: 38846615
thanks

Not so much a solution but confirmation that there's nothing I can do about it.

Cheers
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Device Location 4 29
HttpPostedFile 1 26
How to parse the string and split the sub directory names in asp.net 7 41
Winform Module - What is the ASP.Net equiv 2 22
Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question