Solved

c# winforms application button are looking 'wrong'

Posted on 2013-01-30
6
341 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 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