The vbSkinner control is very simple to use, you just need to place a control in a form and then it will have the functionality of having skinning capabilities.
The first thing you need, in order to have vbSkinner in the ToolBox, is to go to the Project/Components and select :) vbSkinner Pro 2 for VB6. Now you can place it in the form(s).
In Version 2 it is possible to skin all the project forms by placing only one
Skinner control in one form. This form is usually the main form
of the project.
In order to have this feature working you need to change the ApplyTo property setting to skAllForms (2) and to place the following line of code in the Form_Load event of the form:
Set Skinner1.Forms = Forms
If you want to have a special feature in one or more forms, although you are
making the skin in the whole project with one Skinner, you can still add a
Skinner to any form where you want something different. For instance if you want
to have another button at the title bar or if you don't want it, or if you want
to manage the events inside the form.
Another feature added in version 2 is making the skin in the MsgBox and InputBox dialog boxes automatically. In order to do this, you don't have to do anything, just leave the SkinBoxes property to True (as it is by default).
There are also some functions that you may want to customize, like the buttons that appear in the title bar, or the dialog box for changing skins. To do that, go to the properties screen and select 'Custom'. The property pages 'Buttons', 'Change skin dialog' and 'License' will appear.
In the property page 'Buttons' you can specify some extra buttons that the form normally doesn't have, with specific functionality, as follows:
This button gives an alternative to minimize, where the form is reduced at just the title bar.
Pressing this button will make the form always stay on top of all other windows.
Displays the change skin dialog box, where the user can select a different skin, He can also load a skin file.
It allows to have a button in the title bar for a specific use, when the user clicks this button the event CustomButtonClick() will be triggered.
When the user clicks this button the event HelpButtonClick() is triggered.
If you want to set the configuration you have made in a vbSkinner control as default, just press the button 'Set as default'. Then when you place another vbSkinner control in another form, it will be initialized with the properties as you have set them.
After that, if you want to go back to the original values, you can delete the default values saved pressing in the button that is below. See this with more details.
The properties that refer to the ToolTipText of every button can also be customized. See the related topic Adapt to the language.
In the property page 'Change skin dialog' you can specify some features about how the dialog box is shown, as well as the text that appears in this one.
Where it shows 'User available options' you can set the way it will be available to the user for changing the skin, as follows:
1) To set a skin manually with the included ones in the control for
a) The title bar
b) The title bar text color (caption of the window)
c) The body of the form
d) Text color of the form body,
that is, the ForeColor of the controls that you had put in the form.
Note: for this characteristic to be available the property ChangeControlsForeColor must have value True
2) To load a skin from a file, which is a bit map file (*.bmp) which defines all the characteristics of the skin that will appear. The users can save the current skin in a file, and modify it with an image editor to make their own skin.
3) Both: The skins included in the control and to load a skin from a skin
(To learn more on this topic read the ChSD_UserAvailableOptions property)
You can set if the Help button will be visible in the change skin dialog box or not, and if it is visible you can also choose the action to take when pressing this button, the alternatives are:
1) To display the default help message
2) Trigger the ChangeSkinDialogHelpClick event and display your own help message writing code in this event.
Another thing you can customize is the folder where the skins will be
looked for by default, when the user press the buttons 'Save to file' or 'Load
If you leave it blank, the path where your application is installed will be used. That means if the path is C:\Program files\YourApp\YourApp.exe the folder will be C:\Program files\YourApp\. If on the other hand you specify a skins folder, for example 'Skins', when pressing the mentioned command buttons it will look in C:\Program files\YourApp\Skins.
Consider that if you are going to distribute additional skin files with your application, to include them in the setup package and to place them in the right folder.
In this property you can also specify an absolute path , like 'C:\My skins'.
The name of this property by code is ChSD_SkinsFolder
An associate property is ChSD_SaveSkinsFolder
which you can see in the property page where you read 'Save skins folder'.
If this checkbox is checked (property set to True) when the user saves a skin file or when he loads one pressing the corresponding buttons, it will be remembered the next time, so the skins folder may be selected by the user and it is remembered for the next file operations.
In this property page you can also set the text of the change skin dialog box. To see details about that see the topic Adapting to the language.
In this topic the use of the control in a simple way was described and no code was necessary, but there might be cases where you want to display your own dialog box for changing skins, for this read the topic Changing skin
|See also:||Notice for the use of the vbSkinner control (important)|
|How to customize skins|
|List of properties, methods and events|