How to change opacity of a control

Hello,

I want to know if there is a way to make a custom control which have an Opacity property

(like in a form).

I thought to something like that :


Code Snippet

Public Class ButtonOpacity : Inherits Button

End Class

With a property named Opacity or something else, and a method to change the opacity of the button.

If somebody knows how, thank you !

[708 byte] By [dvkCH] at [2008-1-8]
# 1

I see one example about creating glass button in codeproject. This glass button is transparent. Try this. I guess it should be fit for your need. Visit here:

http://www.codeproject.com/cs/miscctrl/glassbutton.asp

Best Regards

Learn_vb.net at 2007-10-2 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 2
Well, thank you very much, but I think i didn't explain what i was really looking for.
I want to make a new border style for my form (including title bar). At this time I made this with 8 buttons ( 1per side and 1 per corner) and each one displays a picture. It look good, but to be really beautiful this buttons may be transparent, but not displaying the form background, but like in Aero, the other windows. That's why i need to make controls with variant opacity. If you know another way than using a lot of buttons I'll be very happy.

Stan

ps : If i change the main windows opacity everything is OK , excepting that controls i wanna see are transparents too.

dvkCH at 2007-10-2 > top of Msdn Tech,Visual Basic,Visual Basic Language...