The activex control composition:
This skin includes 2 major files, "skinvariant.ocx"
is the activex control,"skinres.dll" is the skin resource
file, there are two assistant file in addition, "reg.dat"
helps you to register skinvariant control (certainly you can register
by yourself through "regsvr32"), "msvcrtd.dll"
is that vc runtime library,if there is no this file on your machine,
you need to copy it to your system directory.
operating manual:
1.Run "reg.dat" to register skinvariant control at first,
or you may run regsvr32 to register
2.Reference skinvariant control in your vb project, open vb menu "Project/component"
, then select skinvariant
3.Insert a new module to your program, then copy the following codes
to the module
Public FrmCount As Long
Public nTimeId As Long
Public Declare Function SetTimer Lib "user32" (ByVal hWnd
As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc
As Long) As Long
Public Declare Function KillTimer Lib "user32" (ByVal
hWnd As Long, ByVal nIDEvent As Long) As Long
Public skin As New Skinner
Public Sub BeginSkin(strPath As String)
If skin.BeginHook(strPath, "Demo", "Demo") =
True Then
FrmCount = 0
nTimeId = SetTimer(0, 0, 100, AddressOf TimerProc)
End If
End Sub
Public Sub EndSkin()
skin.EndHook
If nTimeId <> 0 Then KillTimer 0, nTimeId
End Sub
Public Sub AddForms()
If FrmCount = Forms.Count Then Exit Sub
Dim frm As Form
For Each frm In Forms
DoEvents
skin.AddForm frm
Next
FrmCount = Forms.Count
End Sub
Sub TimerProc(hWnd As Long, msg As Long, idEvent As Long, millSec
As Long)
If skin.IsSkinned = True Then AddForms
End Sub
4. Add the following code where you want to load skinvariant,and
strPath represent the skin resource file's path.
Dim strPath As String
strPath = App.Path + "\skin\" + "xp_blue.dll"
'
BeginSkin strPath
5. Add the following code where you want to unload skinvariant
EndSkin
and now compile and run your appliction, see what
has happend, all controls's skin have been changed,
is it cool !!!!!!!!
This skin supports almost all controls in vb6, including the menu,
toolbar, treeview, listview,etc.
Test environment: vb6+win2000.
and the new skin resource file will be added successively ¡¡¡¡
Skin result(xp_belv.dll)£º
Form UI

Standard Control UI:
Advanced control UI:
Mdi UI

|