# VBForums CodeBank > CodeBank - Visual Basic 6 and earlier >  Simple example on how to skin a form

## Wokawidget

The demo is pretty simple.
The color that is made transparent is the color of top left most pixel, in my case it's bright purple.

WOka

----------


## |2eM!x

awesome!

----------


## DarkX_Greece

Very very nice!

----------


## Birth

Excellent!

Used it in a brand new Splash Screen.

Is there any way to compile this so that we don't need to distribute the DLL? I'm not very familiar with Classes.

Thanks!

----------


## Wokawidget

Just add the class directly into your EXE project. No need to reference the DLL project.
It will work exactly the same.
Hang on...I'll write a demo.

OK...here it is.

Woof

----------


## Wokawidget

And to take it one step further and remove the need for the class at all.

Hope these have helped.

WOka

----------


## Birth

Thanks a lot!

It works perfectly now with no DLL's.

----------


## |2eM!x

hi woka..is it possible to blend a form itself? no menu bars or anything..

----------


## Wokawidget

What do you mean?
Make it transparent, or semi transparent?

Woka

----------


## |2eM!x

i mean delete the top left most pixel all over the form like yours does, except not with a picture box but a form

i hope you understand my bable  :wave:

----------


## Wokawidget

> except not with a picture box but a form


 :Confused: 

 :Frown: 

Woka

----------


## |2eM!x

okay, a form has a .picture property, im setting that picture property to an actual picture.

I would like to do as you do in your projects posted above, but not with a picture box.  I would like to do it with the form itself, is that possible? I dont think i can explain any clearer..

----------


## Wokawidget

Now I understand  :Big Grin: 
Try it. Just change to code so it uses the forms hwnd and HDC instead of the picture boxes.
really busy now, but will take a look at it in a few hrs.

Woka

----------


## |2eM!x

FYI, i dont think its possible..i tried to change sooo much code, and it didnt work..

edit**
I even switched to picture boxes and it doesnt work..try your project with this

----------


## thamizhinpan

Thanks a lot. This is a good project!...

----------


## thamizhinpan

Your program is working correctly. But it shows a pink border in the out side of my form. How can I hide it?(look attachment)

----------


## Seraphino

Is there anyway to make it so that I can make it my "Office Assistant" like object. I want to make it so that it helps my people during writing in my text editor. But I want it to Overlay so that it does not go behind the form when people click.

I want to make it like that paper clip in word or something like that.

----------


## Birth

thamizhinpan, the pink border around your pic is because of antialiasing generated by your graph editor. Try to turn this off or remove the pink pixel by pixel.

----------


## ohailo

can you make a windows vista skin like a form will be like a glasses...please? i really need a skin for my program!..if anyone knows a thing that can skin a program perfectly for free please help me...!!

----------


## Wokawidget

Vista skin...glasses?
Not sure I follow.

Woka

----------


## LaVolpe

> Vista skin...glasses?
> Not sure I follow.
> 
> Woka


The OP probably means Vista glass effect.

----------


## ohailo

i mean a form will be look likes a glasse's or something...but anyway i just want to skinned my form,i dont mind if i cant get a glasses effect skin but all i just want is to skinned the form so that my form will look like a professional..i try'd vbSkinner Pro 2 before but i hate license key so i ddnt continue using it...and also i try'd ActiveSkin 4.3 but its seems not to be perfect to my project so i need help into this...amm i just want to my form to skinned by so that it will looks nice and wow....thank you so much..any help will be appreciated..

----------


## mustiback

awesome

----------


## Trusted

I cannot open it.

I am using VS 2010 / VB 10. It says you cannot open this file...

How can I open it?

----------


## Pradeep1210

That project is meant for VB6.

----------


## Wokawidget

Yup. this is for VB 6 (Visual Studio 6).
VB.NET is essentially VB7, and has an entirely different language structure.

This VB6 project uses APIs that can be messy and complex.
Using VB.NET things like this can be done much simpler and safer using the .NEt framework.

Woka

----------


## Trusted

Is it possible for you to make something in .NET for us?

Thanks in advance,

Trusted

----------


## Wokawidget

Hi,

Sorry I don't have time.
Plus a million other people beat me to it  :Big Grin: 

Here's a link Hack once posted for some code on CodeProject.com.

Code is simple and easy to change.
It could do with some cleaning up though...like renaming all the controls to something instead of Button1, Panel9 etc.

http://www.codeproject.com/KB/vb/Ski...in_VB.Net.aspx

Hope that helps.

Woka

----------


## Trusted

Thanks Woka,

I will check it out...

Thanks again,

Trusted

----------


## gurmeet.athwal

Hi thanks for the code..
Can you tell me how to skin the form to the shape of the text in a Label... I am trying to make a transparent clock. Is it possible with this code..?? please help..!!

----------


## Wokawidget

You would need to store the numbers as seperate images, with a purple background color.
Then every minute, using a timer, add the required images to a  picture box and positiojn them correctly. then reskin.
I think if you want to display seconds then you may have an issue due to the overhead of the skinning process.

Woka

----------


## gurmeet.athwal

thanks a lot.. :Thumb: 
now I am rebuilding it in vb.net. 
i am trying to rotate an image every second. thus the memory usage of the app. keeps increasing. please hekp how can i restrict the memory usage..! :Frown:

----------


## Wokawidget

This is a VB6 example. NONE of the code here applies to .NET.
.NET allows you to skin forms much more easily and effeciently.
You will need to ask this is the relevant .NET section.

Woka

----------

