ERFORDERLICHE
OBJEKTE
1 Checkbox (Check1)
FORM-CODE
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 Sub Check1_Click()
If Check1.Value = 1 Then
'Fenster immer im Vordergrund
Call SetWindowPos(Me.hwnd, -1, 0, 0, 0, 0, 3)
Else
'Fenster im Normalzustand
Call SetWindowPos(Me.hwnd, -2, 0, 0, 0, 0, 3)
End If
End Sub
Private Sub Form_Load()
Check1.Caption = "Im Vordergrund"
End Sub
|