[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

c# winforms application button are looking 'wrong'

Posted on 2013-01-30
6
Medium Priority
?
344 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

656 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