【VB开源代码栏目提醒】:网学会员--在 VB开源代码编辑为广大网友搜集整理了:15.frm绩等信息,祝愿广大网友取得需要的信息,参考学习。
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form Form1
Caption = "测试运行进度"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 5970
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 5970
StartUpPosition = 3 '窗口缺省
Begin MSComctlLib.ProgressBar prgTestBar
Height = 495
Left = 120
TabIndex = 8
Top = 2640
Width = 5775
_ExtentX = 10186
_ExtentY = 873
_Version = 393216
Appearance = 1
Max = 10000
End
Begin VB.Frame Frame1
Caption = "测试进度控制状态"
Height = 2055
Left = 240
TabIndex = 0
Top = 360
Width = 5295
Begin VB.CommandButton cmbExit
Caption = "结束"
Height = 495
Left = 2880
TabIndex = 7
Top = 1440
Width = 1215
End
Begin VB.CommandButton CmdTestBar
Caption = "
演示"
Height = 495
Left = 480
TabIndex = 6
Top = 1440
Width = 1335
End
Begin VB.TextBox txtMin
Height = 270
Left = 3840
TabIndex = 5
Text = "txtMin"
Top = 960
Width = 1095
End
Begin VB.TextBox txtMax
Height = 270
Left = 3840
TabIndex = 4
Text = "txtMax"
Top = 480
Width = 1095
End
Begin
VB.ComboBox cboAlign
Height = 300
ItemData = "15.frx":0000
Left = 360
List = "15.frx":000D
TabIndex = 1
Text = "Combo1"
Top = 480
Width = 2415
End
Begin VB.Label Label2
Caption = "最小"
Height = 255
Left = 3240
TabIndex = 3
Top = 960
Width = 375
End
Begin VB.Label Label1
Caption = "最大"
Height = 255
Left = 3240
TabIndex = 2
Top = 480
Width = 615
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Sub CenterFrame()
Frame1.Move _
(Form1.ScaleWidth / 2) - (Frame1.Width / 2), _
(Form1.ScaleHeight / 2) - (Frame1.Height / 2), _
Frame1.Width, _
Frame1.Height
End Sub
Private Sub cboAlign_Click()
prgTestBar.Align = cboAlign.ListIndex
If prgTestBar.Align = 0 Then
prgTestBar.Width = Frame1.Width
prgTestBar.Left = Frame1.Left
prgTestBar.Top = Frame1.Top + Frame1.Height + 200
End If
End Sub
Private Sub cmbExit_Click()
End
End Sub
Private Sub cmdTestBar_Click()
Dim intBarValue As Integer
On Error GoTo ErrorHandler
prgTestBar.Min = CInt(txtMin)
prgTestBar.Max = CInt(txtMax)
For intBarValue = prgTestBar.Min To prgTestBar.Max
prgTestBar.Value = intBarValue
DoEvents
Next
prgTestBar.Value = prgTestBar.Min
Exit Sub
ErrorHandler:
Select Case Err.Number
Case Is = 13
MsgBox "Invalid property value", , App.ProductName
Case Is = 6
MsgBox "Property value too large", , App.ProductName
Case Else
MsgBox "Maximum value must be greater than Minimum value", , App.ProductName
End Select
Exit Sub
End Sub
Private Sub Form_Load()
CenterFrame
txtMin = 0
txtMax = 10000
cboAlign.ListIndex = 1
End Sub
Private Sub Form_Resize()
CenterFrame
cboAlign_Click
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
End Sub