VB.NET How Do I skin a vb.net app

user31642 picture user31642 · Oct 26, 2008 · Viewed 17.6k times · Source

I want to skin a vb.net app I made ive googled some stuff and I've seen skinned vb.net apps.

However it seems like any time i try to find someone explaining it its a link to a pay for product.

Does anyone have anything useful on this?


I have seen some free ways to do this programatically I cannot seem to make it translate entirely over to my own unique program.

Answer

Giovanni Galbo picture Giovanni Galbo · Oct 28, 2008

I remember making a "skinnable" vb.net winforms app (a media player) when I was still a student (maybe 6 years ago).

It was ugly, but the way I did it was as follows:

  1. Select a transparency color. Wherever you use this color the app will be transparent (I used Fuchsia (#FF00FF), which I recall being a standard for video games back in the day.

  2. Use a naming convention for child controls (particular buttons, sliders, etc).

  3. Create images for the controls in step 2.

  4. Set 1 pixel wide color coated place holders for those controls. Eg a blue pixel was my play button, a green pixel was my pause button, etc. The placeholder marked the upper left corner of the control.

  5. At runtime dynamically generate the controls (really images with onclick events) and place them on top of the place holders.

I'm sure there is a nicer way to do this, but that was my crude approach.