Solved

c# winforms application button are looking 'wrong'

Posted on 2013-01-30
6
337 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
.NET Error 7 42
Object Oriented Best Practice 5 35
VB.NET HttpWebRequest 12 34
Visual Studio 2013 debugging 2 24
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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now