Leaders snarfblam Posted November 19, 2003 Leaders Posted November 19, 2003 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)? Quote [sIGPIC]e[/sIGPIC]
Mehyar Posted November 19, 2003 Posted November 19, 2003 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 ? Quote Dream as if you'll live forever, live as if you'll die today
Leaders snarfblam Posted November 19, 2003 Author Leaders Posted November 19, 2003 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. Quote [sIGPIC]e[/sIGPIC]
iebidan Posted November 27, 2003 Posted November 27, 2003 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 Quote Fat kids are harder to kidnap
Leaders snarfblam Posted November 29, 2003 Author Leaders Posted November 29, 2003 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. Quote [sIGPIC]e[/sIGPIC]
Engine252 Posted November 29, 2003 Posted November 29, 2003 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 ;-) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.