progbar.frm
来自「吃豆子游戏的源代码。 嘿嘿」· FRM 代码 · 共 150 行
FRM
150 行
VERSION 5.00
Begin VB.Form LoadingForm
BorderStyle = 3 'Fixed Dialog
Caption = "Loading..."
ClientHeight = 1515
ClientLeft = 45
ClientTop = 330
ClientWidth = 4335
Icon = "Progbar.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1515
ScaleWidth = 4335
StartUpPosition = 2 'CenterScreen
Begin VB.PictureBox Progbar
BackColor = &H0000FFFF&
FillColor = &H000080FF&
FillStyle = 0 'Solid
ForeColor = &H000080FF&
Height = 420
Left = 270
ScaleHeight = 360
ScaleWidth = 3735
TabIndex = 0
Top = 765
Width = 3795
Begin VB.Label CurrPer
Alignment = 2 'Center
BackStyle = 0 'Transparent
BeginProperty Font
Name = "Times New Roman"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 45
TabIndex = 4
Top = 45
Width = 3660
End
Begin VB.Shape Progress
BorderColor = &H00000000&
FillColor = &H000000FF&
FillStyle = 0 'Solid
Height = 1230
Left = -45
Top = -45
Width = 15
End
End
Begin VB.Image Image1
Height = 480
Left = 3465
Top = 135
Width = 480
End
Begin VB.Label Info
Caption = "f"
BeginProperty Font
Name = "Times New Roman"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 675
TabIndex = 3
Top = 405
Width = 2940
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "VB-Pacman By Arvinder Sehmi 1999"
BeginProperty Font
Name = "Times New Roman"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 270
TabIndex = 1
Top = 1215
Width = 3795
End
Begin VB.Label MainTitle
Caption = "Loading Vb-Pacman...."
BeginProperty Font
Name = "Times New Roman"
Size = 11.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 270
TabIndex = 2
Top = 45
Width = 3840
End
End
Attribute VB_Name = "LoadingForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'update the percentage and position and colour of the progress bar
Public Sub UpdPer(Num As Integer, MaxNum As Integer)
Dim Per As Integer 'the cureent pecent
Per = Int((100 / MaxNum) * Num) 'calculate the percent
CurrPer.Caption = Per & "%" '\-- show the percent
Me.Caption = "Loading..." & CurrPer.Caption '/-- in the caption
' work out the colour , backcolour and width of bar
Progress.FillColor = RGB(255, Int(255 / 100) * Per, 0)
Progbar.BackColor = RGB(255, 255 - (Int(255 / 100) * Per), 0)
Progress.Width = (Int(Progbar.Width / 100) * Per) + (45 * 2)
End Sub
Private Sub Form_Load()
Image1.Picture = Me.Icon
Me.Visible = True
End Sub
'refresh the form on change to it's appearence
Private Sub Info_Change()
Me.Refresh
Info.Refresh
End Sub
'reset the progress bar
Public Sub Reset_Bar()
Me.Visible = False
CurrPer.Caption = "0%"
Me.Caption = "Loading...0%"
Progress.FillColor = vbRed
Progbar.BackColor = vbYellow
Progress.Width = 0
Unload Me
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?