Eine Frage zu diesem Code
Option Explicit
'Deklaration: Globale Form API-Konstanten
Private Const SWP_NOMOVE As Long = &H2
Private Const SWP_NOSIZE As Long = &H1
Private Const HWND_TOPMOST As Long = -1&
Private Const HWND_NOTOPMOST As Long = -2&
'Deklaration: Globale Form API-Funktionen
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 CommandButton1_Click()
Unload Me
End Sub
Private Sub UserForm_Activate()
SetWindowPos Application.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + _
SWP_NOSIZE
AppActivate Me.Caption
'End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
SetWindowPos Application.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE + _
SWP_NOSIZE
End Sub
Bei Windows 2000 kommt Fehlermeldung.
Bei Windows XP einwandfrei.
Vorab schon mal ein Dankeschön
Gruss Erich