Private Declare Function SetWindowPos& Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)
Private Sub Form_Click()
Me.Visible = False
End Sub
Private Sub Form_Load()
o = 10
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, 3
End Sub
Private Sub Form_Resize()
Label1.Width = Width - 400
Label1.Height = Height - 1200
End Sub
Private Sub Label1_Click()
Unload Me
End Sub
Private Sub Timer1_Timer()
i = i + 1
If i >= 60 * 60 Then
Me.Visible = True
Timer2.Enabled = True
Timer1.Enabled = False
i = 0
End If
End Sub
Private Sub Timer2_Timer()
If o <= 0 Then
o = 10
Timer2.Enabled = False
Me.Visible = False
Timer1.Enabled = True
Exit Sub
End If
可以做一个最前窗体.
Private Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Const HWND_TOPMOST = -1
Private Sub Form_Load()
Dim retValue As Long
retValue = SetWindowPos(Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, 1)