home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
- Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
- Object = "{FE666755-7DB5-47B5-9F9E-ABC3D730AF26}#1.0#0"; "SCLabel.ocx"
- Begin VB.Form Form1
- Caption = "Form1"
- ClientHeight = 5715
- ClientLeft = 555
- ClientTop = 1125
- ClientWidth = 5850
- ClipControls = 0 'False
- LinkTopic = "Form1"
- ScaleHeight = 5715
- ScaleWidth = 5850
- StartUpPosition = 2 'CenterScreen
- Begin VB.VScrollBar VScroll2
- Height = 1095
- Left = 2520
- TabIndex = 28
- Top = 600
- Width = 255
- End
- Begin SCLABELLib.SCLabel SCLabel3
- Height = 375
- Left = 4320
- TabIndex = 27
- Top = 2280
- Width = 1335
- _Version = 65536
- _ExtentX = 2355
- _ExtentY = 661
- _StockProps = 13
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.24
- Charset = 204
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Caption = "SCLabel rigth"
- Alignment = 3
- Enabled = -1 'True
- End
- Begin SCLABELLib.SCLabel SCLabel2
- Height = 255
- Left = 1920
- TabIndex = 22
- Top = 2280
- Width = 2175
- _Version = 65536
- _ExtentX = 3836
- _ExtentY = 450
- _StockProps = 13
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 204
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Caption = "SCLabel desabled centered"
- Alignment = 2
- Enabled = 0 'False
- End
- Begin SCLABELLib.SCLabel SCLabel1
- Height = 255
- Left = 240
- TabIndex = 21
- Top = 2280
- Width = 1335
- _Version = 65536
- _ExtentX = 2355
- _ExtentY = 450
- _StockProps = 13
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 204
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Caption = "SCLabel left"
- Alignment = 1
- Enabled = -1 'True
- End
- Begin VB.ComboBox Combo3
- Enabled = 0 'False
- Height = 315
- Left = 240
- TabIndex = 19
- Text = "Combo3"
- Top = 5160
- Width = 1575
- End
- Begin VB.ComboBox Combo2
- Height = 315
- Left = 240
- TabIndex = 18
- Text = "Combo2"
- Top = 4680
- Width = 1575
- End
- Begin VB.CommandButton Command3
- Caption = "Set skin directory"
- Height = 375
- Left = 240
- TabIndex = 17
- Top = 1680
- Width = 1815
- End
- Begin VB.TextBox Text4
- Height = 855
- Left = 3960
- MultiLine = -1 'True
- ScrollBars = 3 'Both
- TabIndex = 16
- Text = "Form1.frx":0000
- Top = 1200
- Width = 1695
- End
- Begin VB.CommandButton Command2
- Caption = "ApplySkin"
- Height = 375
- Left = 240
- TabIndex = 15
- Top = 1200
- Width = 1815
- End
- Begin VB.CommandButton Command1
- Caption = "RemoveSkin"
- Height = 375
- Left = 240
- TabIndex = 14
- Top = 720
- Width = 1815
- End
- Begin VB.Frame Frame4
- Caption = "RadioButton"
- Height = 1695
- Left = 120
- TabIndex = 13
- Top = 2640
- Width = 1095
- Begin VB.CheckBox Check1
- Caption = "Skin1"
- Height = 255
- Left = 120
- TabIndex = 26
- Top = 240
- Width = 735
- End
- Begin VB.OptionButton Option1
- Caption = "Skin1"
- Height = 255
- Left = 120
- TabIndex = 25
- Top = 960
- Width = 735
- End
- Begin VB.CheckBox Check2
- Caption = "Skin2"
- Height = 255
- Left = 120
- TabIndex = 24
- Top = 600
- Width = 735
- End
- Begin VB.OptionButton Option2
- Caption = "Skin2"
- Height = 255
- Left = 120
- TabIndex = 23
- Top = 1320
- Width = 735
- End
- End
- Begin ComctlLib.TabStrip TabStrip1
- Height = 1095
- Left = 2040
- TabIndex = 12
- Top = 4560
- Width = 2055
- _ExtentX = 3625
- _ExtentY = 1931
- _Version = 327682
- BeginProperty Tabs {0713E432-850A-101B-AFC0-4210102A8DA7}
- NumTabs = 1
- BeginProperty Tab1 {0713F341-850A-101B-AFC0-4210102A8DA7}
- Caption = ""
- Key = ""
- Object.Tag = ""
- ImageVarType = 2
- EndProperty
- EndProperty
- End
- Begin VB.TextBox Text2
- Enabled = 0 'False
- Height = 375
- Left = 3960
- TabIndex = 9
- Text = "Text2"
- Top = 720
- Width = 1695
- End
- Begin VB.Frame Frame1
- Caption = "Skin set"
- Height = 2175
- Left = 120
- TabIndex = 7
- Top = 0
- Width = 2055
- Begin VB.ComboBox Combo1
- Height = 315
- Left = 120
- Style = 2 'Dropdown List
- TabIndex = 8
- Top = 240
- Width = 1815
- End
- End
- Begin MSComctlLib.Slider Slider1
- Height = 375
- Left = 4200
- TabIndex = 6
- Top = 4560
- Width = 1575
- _ExtentX = 2778
- _ExtentY = 661
- _Version = 393216
- End
- Begin VB.VScrollBar VScroll1
- Enabled = 0 'False
- Height = 1095
- Left = 3240
- TabIndex = 5
- Top = 600
- Width = 255
- End
- Begin ComctlLib.ListView ListView1
- Height = 1620
- Index = 0
- Left = 1320
- TabIndex = 4
- Top = 2760
- Width = 2775
- _ExtentX = 4895
- _ExtentY = 2858
- View = 2
- LabelWrap = -1 'True
- HideSelection = -1 'True
- _Version = 327682
- ForeColor = -2147483640
- BackColor = -2147483643
- BorderStyle = 1
- Appearance = 1
- NumItems = 0
- End
- Begin ComctlLib.ProgressBar ProgressBar1
- Height = 255
- Left = 4200
- TabIndex = 3
- Top = 5280
- Width = 1575
- _ExtentX = 2778
- _ExtentY = 450
- _Version = 327682
- Appearance = 1
- End
- Begin VB.ListBox List1
- Height = 1620
- Left = 4200
- TabIndex = 2
- Top = 2760
- Width = 1455
- End
- Begin VB.HScrollBar HScroll1
- Height = 255
- Left = 2400
- TabIndex = 1
- Top = 240
- Width = 1215
- End
- Begin VB.TextBox Text1
- Height = 375
- Left = 3960
- TabIndex = 0
- Text = "Text1"
- Top = 240
- Width = 1695
- End
- Begin VB.Frame Frame2
- Caption = "ScrollBar"
- Height = 2175
- Left = 2280
- TabIndex = 10
- Top = 0
- Width = 1455
- Begin VB.HScrollBar HScroll2
- Enabled = 0 'False
- Height = 255
- Left = 120
- TabIndex = 29
- Top = 1800
- Width = 1215
- End
- End
- Begin VB.Frame Frame3
- Caption = "Edit"
- Height = 2175
- Left = 3840
- TabIndex = 11
- Top = 0
- Width = 1935
- End
- Begin VB.Frame Frame5
- Caption = "Combobox"
- Height = 1215
- Left = 120
- TabIndex = 20
- Top = 4440
- Width = 1815
- End
- Begin VB.Menu File
- Caption = "File"
- Begin VB.Menu Open
- Caption = "Open"
- End
- Begin VB.Menu Exit
- Caption = "Exit"
- End
- End
- Begin VB.Menu Help
- Caption = "Help"
- Begin VB.Menu About
- Caption = "About"
- End
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim fso As New FileSystemObject
- Dim SkinNames(256) As String
- Private SkinOb As New SKINCRAFTERLib.SCSkin
- Private Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OpenFilename) As Long
- Private Const BIF_RETURNONLYFSDIRS = 1
- Private Const BIF_DONTGOBELOWDOMAIN = 2
- Private Const MAX_PATH = 260
- Private Declare Function SHBrowseForFolder Lib "shell32" _
- (lpbi As BrowseInfo) As Long
- Private Declare Function SHGetPathFromIDList Lib "shell32" _
- (ByVal pidList As Long, _
- ByVal lpBuffer As String) As Long
- Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" _
- (ByVal lpString1 As String, ByVal _
- lpString2 As String) As Long
- Private Type BrowseInfo
- hWndOwner As Long
- pIDLRoot As Long
- pszDisplayName As Long
- lpszTitle As Long
- ulFlags As Long
- lpfnCallback As Long
- lParam As Long
- iImage As Long
- End Type
- Private Type OpenFilename
- lStructSize As Long
- hWndOwner As Long
- hInstance As Long
- lpstrFilter As String
- lpstrCustomFilter As String
- nMaxCustFilter As Long
- iFilterIndex As Long
- lpstrFile As String
- nMaxFile As Long
- lpstrFileTitle As String
- nMaxFileTitle As Long
- lpstrInitialDir As String
- lpstrTitle As String
- Flags As Long
- nFileOffset As Integer
- nFileExtension As Integer
- lpstrDefExt As String
- lCustData As Long
- lpfnHook As Long
- lpTemplateName As String
- End Type
- Private Function ShowFileDialog() As String
- Dim ofn As OpenFilename
- ofn.lStructSize = Len(ofn)
- ofn.hWndOwner = hWnd
- ofn.lpstrFilter = "SkinCrafter files (*.skf)" & Chr$(0) & "*.skf" & Chr$(0) & Chr(0) & Chr(0)
- ofn.lpstrFile = String(256, 0)
- ofn.nMaxFile = 255
- ofn.lpstrTitle = "Open Skin"
- ofn.Flags = &H800000 + &H1000 + &H8 + &H4
- ofn.lpstrDefExt = "skf" + Chr(0)
- GetOpenFileName ofn
- If Mid(ofn.lpstrFile, 1, 1) <> Chr(0) Then ShowFileDialog = ofn.lpstrFile
- End Function
- Private Sub About_Click()
- SkinOb.AboutSkinCrafter
- End Sub
- Private Sub Combo1_Click()
- SkinOb.LoadSkinFromFile SkinNames(Combo1.ListIndex)
- SkinOb.ApplySkin
- SkinOb.UpdateControl 0
- End Sub
- Private Sub Command1_Click()
- SkinOb.RemoveSkin
- End Sub
- Private Sub Command2_Click()
- SkinOb.ApplySkin
- End Sub
- Private Function BrowseProc(hWnd As Long, uMsg As Long, lParam As Long, lpData As Long)
- End Function
- Private Sub Command3_Click()
- Dim lpIDList As Long
- Dim szTitle As String
- Dim tBrowseInfo As BrowseInfo
- Dim sDir As String
- szTitle = "This is the title"
- With tBrowseInfo
- .hWndOwner = Me.hWnd
- .lpszTitle = lstrcat(szTitle, "")
- .ulFlags = BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN
- End With
- lpIDList = SHBrowseForFolder(tBrowseInfo)
- If (lpIDList) Then
- sDir = Space(MAX_PATH)
- SHGetPathFromIDList lpIDList, sDir
- sDir = Left(sDir, InStr(sDir, vbNullChar) - 1)
- lSize = FillSkinName(sDir, "*.skf")
- End If
- End Sub
- Private Sub Exit_Click()
- Unload Me
- SkinOb.DeInitDecoration
- End Sub
- Private Sub Form_Initialize()
- SkinOb.InitLicenKeys "0", "SKINCRAFTER", "SKINCRAFTER.COM", "support@skincrafter.com", "DEMOSKINCRAFTERLICENCE"
- SkinOb.DefineLanguage 2
- SkinOb.InitDecoration 1
- End Sub
- Private Sub Form_Load()
- List1.AddItem "ScinCrafter 0"
- List1.AddItem "ScinCrafter 1"
- List1.AddItem "ScinCrafter 2"
- List1.AddItem "ScinCrafter 3"
- List1.AddItem "ScinCrafter 4"
- ProgressBar1.Value = 50
- 'TreeView1.LineStyle = tvwRootLines
- 'TreeView1.Nodes.Add , , "TopLevelBranch1", "TopLevelBranch1"
- 'TreeView1.Nodes.Add "TopLevelBranch1", tvwChild, "SubBranch1_1", "SubBranch1_1"
- 'TreeView1.Nodes.Add "SubBranch1_1", tvwChild, "Node1_1_1", "Node1_1_1"
- 'TreeView1.Nodes.Add "SubBranch1_1", tvwChild, "Node1_1_2", "Node1_1_2"
- 'TreeView1.Nodes.Add "SubBranch1_1", tvwChild, "Node1_1_3", "Node1_1_3"
- 'TreeView1.Nodes.Add "TopLevelBranch1", tvwChild, "SubBranch1_2", "SubBranch1_2"
- 'TreeView1.Nodes.Add "SubBranch1_2", tvwChild, "Node1_2_1", "Node1_2_1"
- 'TreeView1.Nodes.Add "SubBranch1_2", tvwChild, "Node1_2_2", "Node1_2_2"
- 'TreeView1.Nodes.Add , , "TopLevelBranch2", "TopLevelBranch2"
- 'TreeView1.Nodes.Add "TopLevelBranch2", tvwChild, "SubBranch2_1", "SubBranch2_1"
- 'TreeView1.Nodes.Add "TopLevelBranch2", tvwChild, "SubBranch2_2", "SubBranch2_2"
- 'TreeView1.Nodes.Add "SubBranch2_2", tvwChild, "Node2_2_1", "Node2_2_1"
- ' Set view to report
- ListView1(0).View = lvwReport
- ' Add some columns to listview
- ListView1(0).ColumnHeaders.Add , "col1", "col1"
- ListView1(0).ColumnHeaders.Add , "col2", "col2"
- ListView1(0).ColumnHeaders.Add , "col3", "col3"
- For j = 1 To 10
- Set objListItem = ListView1(0).ListItems.Add(, , "data1-" & j)
- objListItem.SubItems(1) = "data2-" & j
- objListItem.SubItems(2) = "data3-" & j
-
- ' Set the tag property of the new ListItem
- objListItem.Tag = j
- Next j
- TabStrip1.Tabs.Remove 1
- TabStrip1.Tabs.Add , , "Text1"
- TabStrip1.Tabs.Add , , "Text1"
- For j = 1 To 10
- Combo2.AddItem "Skin1"
- Next j
- Combo2.Text = Combo2.List(0)
- End Sub
- Private Sub Form_Terminate()
- SkinOb.DeInitDecoration
- End Sub
- Private Sub Open_Click()
- Dim FileName As String
- FileName = ShowFileDialog
- If FileName <> "" Then
- SkinOb.LoadSkinFromFile FileName
- SkinOb.ApplySkin
- SkinOb.UpdateControl 0
- End If
- End Sub
- Private Function FillSkinName(ByVal sFol As String, sFile As String) As Long
- Dim FileName As String, SkinName As String, Path As String
- Dim I As Integer
- Combo1.Clear
- Set fld = fso.GetFolder(sFol)
- FileName = Dir(fso.BuildPath(fld.Path, sFile), vbNormal Or _
- vbHidden Or vbSystem Or vbReadOnly)
- While Len(FileName) <> 0
- FindFile = FindFile + FileLen(fso.BuildPath(fld.Path, _
- FileName))
-
- SkinOb.GetSkinCopyRight fso.BuildPath(fld.Path, FileName), SkinName, "", "", ""
-
- Combo1.AddItem SkinName
- SkinNames(Combo1.NewIndex) = fso.BuildPath(fld.Path, FileName)
-
- FileName = Dir() ' Get next file
- DoEvents
- Wend
-
- Combo1.ListIndex = 0
- End Function
-