![]() |
|
Private Declare Function DestroyWindow Lib "user32" (ByVal hwnd As Long) As Long Private Declare Function IsWindowEnabled Lib "user32" (ByVal hwnd As Long) As Long Private Declare Function MoveWindow Lib "user32" (ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long Private Sub Form_Load() 'KPD-Team 2001 'URL: http://www.allapi.net/ 'E-Mail: KPDTeam@Allapi.net Dim bl As Boolean 'Is the window enabled? bl = IsWindowEnabled(Me.hwnd) MsgBox "Is the form enabled? " + Str$(bl) 'Move the window MoveWindow Me.hwnd, 0, 0, 200, 200, 1 'Show the window Me.Show 'Wait 5 seconds t = Timer Do 'Show the remaining time in the form's caption Me.Caption = 5 - Int(Timer - t) DoEvents Loop Until Timer > t + 5 'Destroy the window DestroyWindow Me.hwnd End Sub |