Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Guys

Does anybody know how to create a glossy button for windows form in VB.NET

Or even just change the two colors of a standard button.

Thanks Guys
Posted

You can make your button show a bitmap, or write code to make it draw itself. I'm not sure what you mean by 'glossy', but a bitmap is the best way to get lighting effects.
 
Share this answer
 
Comments
m@r10 30-Aug-12 12:21pm    
Hi Cristian
Thank you for the quick reply.
Im very new at dev so bare with me

I have managed to place a pic as background image and on click event it changes the background pic to another which is fine...

But what I mean is the the standard gradient they give you " The light gray and dark gray color effect when choosing a new button.
I want to change the colors to say Blue and black and have the same nice effect when you click the button.

Shout..if im not making any sence

:)
Christian Graus 30-Aug-12 12:22pm    
You have to change your bitmap to do that, a bitmap button does not show anything else AFAIK.
m@r10 30-Aug-12 12:25pm    
I figured as much... :)
Last question..
. Is there an easy way to round the corners of a button
Christian Graus 30-Aug-12 12:28pm    
http://www.codeproject.com/Articles/32401/Transparent-Buttons-in-NET shows how to make transparent buttons. Your button will ALWAYS be square, but you can use transparency to make it look round
m@r10 30-Aug-12 12:28pm    
Christian check this out

http://www.codeproject.com/Articles/17695/Creating-a-Glass-Button-using-GDI
Use a toolstrip. Set it's dock to none, it's grip style to hidden, and it's render mode to system. Change it's background color to match your form, or to transparent. Place it on your form wherever you like, and add buttons. Use images and / or text on the buttons. They will have no border, and will pop up and look glassy when you mouse over them. Works great with images.

You can download one of my projects here to see it, and how to do it.

hope this helps... and if this is your answer, please hit the green button.

- Pete
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900