谢谢管理员,网上找到一个系统运行时间
Private Declare Function GetTickCount Lib "kernel32" () As Long
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Private Sub Form_Load()
Dim aaa As Long
aaa = GetTickCount
Dim d As Date
d = TimeSerial(0, 0, aaa / 1000)
Label1.Caption = "Windows已经运行了" & d
For i = 0 To 3
Line1(i).Visible = False
Next
MyMenu = GetSystemMenu(Me.hwnd, 0)
RemoveMenu MyMenu, &HF060, MF_BYCOMMAND
End Sub
Private Sub Label2_Click()
End
End Sub
Private Sub Timer1_Timer()
Dim aaa As Long
aaa = GetTickCount
Dim d As Date
d = TimeSerial(0, 0, aaa / 1000)
Label1.Caption = "Windows已经运行了" & d
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
For i = 0 To 3
Line1(i).Visible = False
Next
End Sub
Private Sub Label2_MouseDown _
(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Line1(0).BorderColor = &H80000010
Line1(1).BorderColor = &H80000010
Line1(2).BorderColor = &HE0E0E0
Line1(3).BorderColor = &HE0E0E0
End If
End Sub
Private Sub label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Line1(0).BorderColor = &HE0E0E0
Line1(1).BorderColor = &HE0E0E0
Line1(2).BorderColor = &H80000010
Line1(3).BorderColor = &H80000010
For i = 0 To 3
Line1(i).Visible = True
Next
End Sub