📄 frmskinbrowser.frm
字号:
VERSION 5.00
Begin VB.Form frmbrowseskins
BorderStyle = 4 'Fixed ToolWindow
Caption = "Skin Browser"
ClientHeight = 4410
ClientLeft = 45
ClientTop = 285
ClientWidth = 6690
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4410
ScaleWidth = 6690
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.Frame Frame1
Caption = "Skin Comment"
Height = 1560
Left = 105
TabIndex = 3
Top = 2745
Width = 5355
Begin VB.Label Comment
Caption = "Please select a skin..."
Height = 1170
Left = 105
TabIndex = 4
Top = 285
Width = 5115
End
End
Begin VB.ListBox List1
Height = 2595
Left = 90
Sorted = -1 'True
TabIndex = 2
Top = 60
Width = 6480
End
Begin VB.CommandButton SetSDir
Caption = "Set Dir..."
Height = 960
Left = 5550
TabIndex = 1
Top = 2835
Width = 1035
End
Begin VB.CommandButton close
Caption = "&Close"
Height = 345
Left = 5550
TabIndex = 0
Top = 3945
Width = 1020
End
End
Attribute VB_Name = "frmbrowseskins"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Skin Browser
'============
' Displays a list of skins with description of currently selected skin. When a
' skin is selected it is immediately loaded and functional.
'
' Thanks to: ????? for starting the basic form
'
' Starts here and loads the current default skin directory
Private Sub Form_Load()
Call ReadSkinDir(OptSkinPath)
End Sub
' Exits and unloads the form
Private Sub close_Click()
Unload Me
End Sub
' Sets the Skin directory using the "browse for folder" dialog
Private Sub SetSDir_Click()
Dim A As String
A = GetBrowseDir(Me, "Select Skin Directory:")
If A <> "" Then
OptSkinPath = A
Call ReadSkinDir(OptSkinPath)
End If
End Sub
' Loads the skin when selected
Private Sub List1_Click()
Dim F As String, Path As String, P As Integer
On Error GoTo ErrHandler1
Path = OptSkinPath: If Path = "" Then Path = ValidateDir(App.Path)
F = List1.List(List1.ListIndex)
P = InStr(F, " > ")
If P > 0 Then
F = Path & Left$(F, P - 1) & ".skin"
Call frmVBAmp.LoadSkin(ByVal F, False)
Comment.Caption = SkinInfo 'display the skin comment
End If
ErrHandler1:
End Sub
' Reads the files in the specified directory. Each file is opened to check
' if it is a valid VB-Amp skin file then it reads the description from the header
Sub ReadSkinDir(A As String)
Dim FIO As Integer, Path As String, K As String, Desc As String
List1.Clear 'clear the list
FIO = FreeFile
Path = ValidateDir$(A)
K = Dir$(Path & "*.skin")
While K <> ""
Open Path & K For Input As FIO
Input #FIO, Desc
If Desc = "VB-Amp Skin" Then
Input #FIO, Desc 'description
P = InStr(1, K, ".skin", vbTextCompare) 'look for the extension
List1.AddItem UCase$(Left$(K, P - 1)) & " > " & Desc 'add the entry
End If
Close FIO
K = Dir$ 'get the next filename
Wend
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -