simula uno screensaver.
imposta su form1, Form1.BorderStyle = 0
codice:
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 Declare Function ShowCursor Lib "user32" _
(ByVal bShow As Long) As Long
Sub AlwaysOnTop(FrmID As Form, OnTop As Boolean)
Const SWP_NOMOVE = 2
Const SWP_NOSIZE = 1
Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
If OnTop Then
OnTop = SetWindowPos(FrmID.hwnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
Else
OnTop = SetWindowPos(FrmID.hwnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
End If
End Sub
Private Sub Form_Load()
Form1.WindowState = 2
Form1.BackColor = RGB(0, 0, 0)
Dim X As Integer
Call AlwaysOnTop(Me, True)
X = ShowCursor(False)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim X As Integer
X = ShowCursor(True)
End Sub
Private Sub Form_Terminate()
Dim X As Integer
X = ShowCursor(True)
End Sub