Jump to content
Xtreme .Net Talk

Recommended Posts

  • Leaders
Posted

I know windows Xp styles supports colored text on buttons (a simple example would be the windows calculator program, which has different colored text on buttons that perform different types of operations). When you set the .flatstyle property of a button to system, however, vs.net will always use the windows default font color rather than the forecolor you specify, preventing you from having xp style buttons with colored text.

 

Is there any workaround for this (including windows apis if necessary)?

[sIGPIC]e[/sIGPIC]
Posted

I still wonder why do we bother so much with Xp style buttons.. If it is only for challenge purposes then ok. But a screen shot on a windows XP will get you the button, just cut in any program (paint for ex) and take it as an image. Use a picture box, or even use a button with that image. I believe its has the same effect.

Doesnt it ?

Dream as if you'll live forever, live as if you'll die today
  • Leaders
Posted

I don't quite understand the question "I still wonder why do we bother so much with Xp style buttons.." If your asking what I think your asking then the simple and obvious answer would be that we bother with them because they are so pretty.

 

Anyways... are you suggesting that I use a picturebox instead of a normal button? One line of code (Application.EnableVisualStyles() ) turns all my buttons (btw my form has 49 buttons on it) into xp style buttons, without using a picturebox for each, and windows handles the drawing of the mouseover, active and pressed states. All I have to is respond to the click event. In this case, using picture boxes to get my pretty buttons would be so much more work, as well as a waste of resources.

[sIGPIC]e[/sIGPIC]
  • 2 weeks later...
Posted
Well, I got some Windows XP Style controls that you can use in your app, I don't know if this controls will be enough, but will be a pretty good start, just lemme know if you want them, so I can mail'em to you
Fat kids are harder to kidnap
  • Leaders
Posted

Ive made my own vb6 activex controls that emulate windows xp buttons almost perfectly. I can acheive the effect i want.

 

however I am just asking if there is any (reasonably simple) way to color the text of actual xp style buttons.

[sIGPIC]e[/sIGPIC]
Posted

i think you can by coloring the control after it has been painted

i must say i did not test this but i believe it is possible

since you already created some activeX controls you should be able to do the coding.

 

but i can confirm the behaviour you discribe above

and im wondered way Mirco$oft din't add this functionality to it's controls.

 

hope it helps ;-)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...