Botones transparentes de C #

Is there a way to create a button that has an image on it with a hole in the middle, thus making the hole transparent? and when another image moves behind the button you see it through the hole?

preguntado el 08 de enero de 11 a las 16:01

yonatan, please accept the answers to more of your questions. -

You might as well consider this not possible in WinForms. If you feel you absolutely need this kind of eye candy, switch to WPF if you're not using it already. -

C# doesn't have buttons. What are you talking about? -

2 Respuestas

Sure, your best bet is to use WPF in this case, XAML has a bunch of nice ways of doing just that. You can use gradient stops in a gradient brush, for example, to set color and transparency.

Respondido el 08 de enero de 11 a las 19:01

Agree, the OP probably wants the hole to be circular, RadialGrandientBrush would be fine for that. - nan

Yes, you can put two images on the button. The round one should be the non visible one.

ver también: ¿Por qué algunos controles tienen propiedades BackgroundImage e Image?

contestado el 23 de mayo de 17 a las 15:05

What do you mean by "two images"? How do you put two images on a button? - Cody Grey ♦

In winForms you have a backgroundImage and a (foreGround)Image. Anyway, the BackColor and ForeColor can be set to Transparent. - Hace

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.