📄 frmmain.frm
字号:
VERSION 5.00
Begin VB.Form frmMain
BackColor = &H00000000&
BorderStyle = 0 'None
ClientHeight = 3255
ClientLeft = 0
ClientTop = 0
ClientWidth = 4695
Icon = "frmMain.frx":0000
LinkTopic = "Form1"
Palette = "frmMain.frx":08CA
PaletteMode = 2 'Custom
ScaleHeight = 3255
ScaleWidth = 4695
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin pCoolProgressBar_Demo.CoolProgressBar cpbProgress
Height = 255
Left = 360
TabIndex = 0
Top = 1500
Width = 3975
_ExtentX = 7011
_ExtentY = 450
BackColor = 0
Color2 = 8438015
Color1 = 128
Max = 200
Value = 0
End
Begin VB.Timer tmrTimer
Interval = 100
Left = 3840
Top = 2280
End
Begin VB.Label lblX
Alignment = 2 'Center
BackColor = &H00000000&
BackStyle = 0 'Transparent
Caption = "X"
BeginProperty Font
Name = "Times New Roman"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000080FF&
Height = 255
Left = 4320
TabIndex = 9
ToolTipText = "Skip"
Top = 120
Width = 255
End
Begin VB.Shape Shape7
BackColor = &H00000000&
BackStyle = 1 'Opaque
BorderColor = &H000040C0&
Height = 255
Left = 4320
Shape = 4 'Rounded Rectangle
Top = 120
Width = 255
End
Begin VB.Label lblPercentage
Alignment = 2 'Center
BackColor = &H00000000&
BackStyle = 0 'Transparent
Caption = "0%"
BeginProperty Font
Name = "Times New Roman"
Size = 11.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000040C0&
Height = 255
Left = 2160
TabIndex = 8
Top = 1920
Width = 975
End
Begin VB.Label Label7
Alignment = 2 'Center
BackColor = &H00000000&
BackStyle = 0 'Transparent
Caption = "| | | |"
BeginProperty Font
Name = "Times New Roman"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000080FF&
Height = 255
Left = 2160
TabIndex = 7
Top = 1920
Width = 975
End
Begin VB.Label Label6
Alignment = 2 'Center
BackColor = &H00000000&
BackStyle = 0 'Transparent
Caption = "| | | | | | | | | | | |"
BeginProperty Font
Name = "Times New Roman"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000080FF&
Height = 255
Left = 3480
TabIndex = 6
Top = 840
Width = 975
End
Begin VB.Label Label5
Alignment = 2 'Center
BackColor = &H00000000&
BackStyle = 0 'Transparent
Caption = "| | | | | | | | | | | |"
BeginProperty Font
Name = "Times New Roman"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000080FF&
Height = 255
Left = 840
TabIndex = 5
Top = 840
Width = 975
End
Begin VB.Shape Shape6
BackColor = &H00000000&
BackStyle = 1 'Opaque
BorderColor = &H000040C0&
Height = 255
Left = 2160
Shape = 4 'Rounded Rectangle
Top = 1920
Width = 975
End
Begin VB.Line Line6
BorderColor = &H000040C0&
X1 = 0
X2 = 4680
Y1 = 2040
Y2 = 2040
End
Begin VB.Shape Shape5
BackColor = &H00000000&
BackStyle = 1 'Opaque
BorderColor = &H000040C0&
Height = 255
Left = 840
Shape = 4 'Rounded Rectangle
Top = 840
Width = 975
End
Begin VB.Shape Shape4
BackColor = &H00000000&
BackStyle = 1 'Opaque
BorderColor = &H000040C0&
Height = 255
Left = 3480
Shape = 4 'Rounded Rectangle
Top = 840
Width = 975
End
Begin VB.Line Line5
BorderColor = &H000040C0&
X1 = 0
X2 = 4680
Y1 = 960
Y2 = 960
End
Begin VB.Shape Shape3
BackColor = &H00000000&
BackStyle = 1 'Opaque
BorderColor = &H000080FF&
Height = 375
Left = 240
Shape = 4 'Rounded Rectangle
Top = 1440
Width = 4215
End
Begin VB.Label Label1
Alignment = 2 'Center
BackColor = &H00000000&
BackStyle = 0 'Transparent
Caption = "Please wait..."
BeginProperty Font
Name = "Times New Roman"
Size = 14.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C0E0FF&
Height = 255
Left = 2040
TabIndex = 1
Top = 240
Width = 2175
End
Begin VB.Line Line4
BorderColor = &H000080FF&
X1 = 360
X2 = 360
Y1 = 1440
Y2 = 360
End
Begin VB.Line Line3
BorderColor = &H000080FF&
X1 = 360
X2 = 2040
Y1 = 360
Y2 = 360
End
Begin VB.Line Line2
BorderColor = &H000080FF&
X1 = 4320
X2 = 4320
Y1 = 2760
Y2 = 1800
End
Begin VB.Line Line1
BorderColor = &H000080FF&
X1 = 3240
X2 = 4320
Y1 = 2760
Y2 = 2760
End
Begin VB.Label Label2
Alignment = 2 'Center
BackColor = &H00000000&
BackStyle = 0 'Transparent
Caption = "Loading . . ."
BeginProperty Font
Name = "Times New Roman"
Size = 26.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C0E0FF&
Height = 615
Left = 480
TabIndex = 2
Top = 2400
Width = 2775
End
Begin VB.Label Label3
Alignment = 2 'Center
BackColor = &H00000000&
BackStyle = 0 'Transparent
Caption = "Loading . . ."
BeginProperty Font
Name = "Times New Roman"
Size = 48
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00004080&
Height = 1095
Left = 0
TabIndex = 3
Top = 2160
Width = 4695
End
Begin VB.Shape Shape2
BackColor = &H00000000&
BorderColor = &H000080FF&
Height = 615
Left = 480
Shape = 4 'Rounded Rectangle
Top = 2400
Width = 2775
End
Begin VB.Label Label4
Alignment = 2 'Center
BackColor = &H00000000&
BackStyle = 0 'Transparent
Caption = "Please wait . . ."
BeginProperty Font
Name = "Times New Roman"
Size = 27.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00004080&
Height = 495
Left = 1440
TabIndex = 4
Top = 0
Width = 3255
End
Begin VB.Shape Shape1
BackColor = &H00000000&
BorderColor = &H000080FF&
Height = 255
Left = 2040
Shape = 4 'Rounded Rectangle
Top = 240
Width = 2175
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim RndNum As Byte 'A random number
Private Sub Form_Load()
Randomize Timer
'Display a (long!) message box about color depths
If MsgBox("Because ''Cool Progress Bar'' creates a gradation effect, it is important" & vbCrLf & _
"that your system's colors are not too low." & vbCrLf & vbCrLf & _
"To see the effect with a minimum of quality, you should have a color depth of" & vbCrLf & _
"High Color (16 bit) or, for best performance, True Color (24 or 32 bits)." & vbCrLf & vbCrLf & _
"To change the color depth of your system, click ''Definitions -> Control" & vbCrLf & _
"Panel'' in your Start Menu, double-click on ''Monitor''. You can now change" & vbCrLf & _
"the color depth in the ''Definitions'' tab.''" & vbCrLf & _
"Click ''Cancel'' to exit and change the color depth of your system.", vbOKCancel Or vbInformation, "Warning") = vbCancel Then
'The user clicked "Cancel", so exit
End
End If
End Sub
Private Sub tmrTimer_Timer()
'This will not load anything at all; in fact,
'all it does is increment the progress bar's
'value randomly (between 0 and 4) every 0.1
'seconds
'Pick a random number
RndNum = Rnd * 4
'Set the percentage label and the progress bar
'(these calculations are only here because the
'progress bar's max is 200 and not 100, to get
'smoother steps each time the value is changed)
cpbProgress.Value = cpbProgress.Value + RndNum
lblPercentage = Str(cpbProgress.Value \ 2) & "%"
'If we've reached the max, unload this and show
'the secondary form
If cpbProgress.Value = 200 Then
Unload Me
frmSecondary.Show
End If
End Sub
Private Sub lblX_Click()
'Skip "loading"
Unload Me
frmSecondary.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -