dotnetman Posted June 2, 2005 Posted June 2, 2005 Friends, We have created a media player and now we would want to add graphics (skins) to it. Our graphics artist has created images for the same. However, the corners of the player need to be curvy and the images he has supplied have curved edges. So, is there a way to make our form corners curved? I am trying AddClosedCurve but I did not find a lot of documentation on its usage. Pls let me know if you know how to do this :) Thank you, Praveen Quote
Leaders snarfblam Posted June 2, 2005 Leaders Posted June 2, 2005 Forms support a transparency key. Any color on the form that matches Form.TransparencyKey will be drawn transparently. This makes skinning real quick and easy. Just pick a color, say magenta, and in the background image, draw transparent areas as magenta. In the form's property, set the TransparencyKey to magenta. Pow! Nifty skins. Quote [sIGPIC]e[/sIGPIC]
dotnetman Posted June 2, 2005 Author Posted June 2, 2005 I have a picture that I have placed on the form. It is taking the picture's back color and showing its square edges. Is there a way to make the picture transparent? Quote
Leaders snarfblam Posted June 2, 2005 Leaders Posted June 2, 2005 I don't quite understand what you mean. Quote [sIGPIC]e[/sIGPIC]
dotnetman Posted June 2, 2005 Author Posted June 2, 2005 Well, transparencykey works only on the form and not for the controls that you place on the form. For that, I will have to set the image(skin) as the form's background image. However, the image that I would want represents just a small part of the entire form (title bar), which is why I added it within a picturebox and placed the picturebox on the form. Now, there is no way that the picturebox would become transparent, even if I use the transparencykey color on the picturebox. phew. this is so complicated to explain!!! Quote
Leaders snarfblam Posted June 2, 2005 Leaders Posted June 2, 2005 I certainly did not have the same problem. I took a form, added a picture box, assigned it an image that contained large portions of white, set the transparency key to white, and the white regions became transparent at runtime. Make sure that you have the transparency key set to exactly the right color, and of course, use a lossless image format for you skin. If you are assigning the image at runtime, try to set the transparency key after you assign the image. Quote [sIGPIC]e[/sIGPIC]
mskeel Posted June 3, 2005 Posted June 3, 2005 (edited) I don't remember where I found this but it is quite possibly the sweetest thing I have ever seen. I also haven't had a chance to play with it much, but perhaps it will help you with some of your problems..RegionMasterControls.zip Edited June 3, 2005 by PlausiblyDamp 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.