Author Topic: Windows XP button style  (Read 6299 times)

0 Members and 1 Guest are viewing this topic.


  • Guest
Windows XP button style
« on: October 20, 2005, 11:34:21 AM »
Okay, I hate my users as much as the next guy, but I've decided to spruce up my Windows Forms. I want to add some xp style buttons with graphics using C#, in a Windows Forms app.

I stumbled on adding a manifest that points the app to the latest common controls dll and that works to get the XP style but...

In order for this to work, you must set the FlatStyle property of the button to System which just so happens to ignore the Image property.

Anybody know of a way to have my cake and image too?

Glenn R

  • Guest
Re: Windows XP button style
« Reply #1 on: October 22, 2005, 07:03:28 PM »
Yep... .NET Framework version 2.0/C# 2.0 I believe. This is a 'bug' (read that somewhere).

BTW, In Acad forms, I just set the flatstyle property and it's good to go.

For a windows app, I just make this call Apllication.EnableVisualStyles() BEFORE Application.Run...haven't put in a manifest.

Hope this helps.



  • Guest
Re: Windows XP button style
« Reply #2 on: October 24, 2005, 09:03:00 AM »
Thanks Glenn,

This particular app is just a windows app, not an autocad form.

I'll try the 'EnableVisualStyles' and see what happens.