How do I assign a skin file to my form?

 

We assume that you have already a skin file ( else you can search for *.esk files in the samples folder of the Exontrol's ExSkin component ). 

There are three options to load your skin to your form

Loading the skin at design mode. Open the form that includes the ExSkin component and do a right click. Select "Load Skin" item from control's context menu. A file open will be shown to let you choose the skin file you want to apply. 

Converting the skin file to a BASE64 encoded string is possible using the Exontrol's ExImages tool. It is free to use, so you have to download it and to run the ExImages.exe file.  The following screen shot shows you the mainframe from the Exontrol's ExImages tool:

Open a Windows Explorer, locate your skin file and drag the file over the area "Drag here a file such of .... ". The tool generates the BASE64 encoded string in two formats: VB or Template. 

The VB format shows like follows:

and it can be copied and pasted to your VB, VC code.

Also, the tool displays the length of the string that's required to hold the file you dragged. Important to notice is that the ExImages tool compresses the file before generating the BASE64 encoded string, but converting it to a BASE64 string it means that the size of the string will be with 1/4 greater than compressed file. The BASE64 encoded strings are useful to hold your icons, pictures, skins in string instead adding all kind of files to your application.

So, after we get the BASE64 encoded string all that you need to do is to pass the s variable to the Load method like follows:

 

The sample automatically updated the form's visual appearance when it shows up

Loading directly the file is possible by passing the path to the skin file to the Load method like in the following sample:

ExSkinForm1.Load "D:\Exontrol\ExSkin\sample\Skins\ICQ.Lite\icqlite.esk"