部分代码如下:
Private Sub Label9_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = vbLeftButton Then MoveForm hWnd
End Sub
Sub msg(str1 As String, Optional title As String, Optional str2 As String)
'Ubar1.Visible = True
If str1 = "" Then Label1.Visible = False
'‘If str2 = "" Then Label2.Visible = False
'Ubar1.Visible = bars
'Me.Show
If title <> "" Then Label9.Caption = title
Label1.Caption = str1
Label2.Caption = str2
End Sub
Sub Value(Value As Long)
If Ubar1.Visible = False Then Exit Sub
Ubar1.Value = Int(Value)
End Sub
Sub stoptimer()
Timer1.Enabled = False
t = 0
Label3.Caption = ""
End Sub
Sub starttimer()
Timer1.Enabled = True
t = 0
End Sub
Private Sub Timer1_Timer()
If Form1.WindowState = 0 Then
Me.Show
Else
Me.Hide
End If
t = t + 1
Label3.Caption = "用时:" & t & "秒"
'If t > 40 Then Me.Hide
End Sub