**Erfind...***
' Globale Deklarationen
Type utRect
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Declare Function utSetWindowPos Lib "user32" Alias "SetWindowPos" (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
' Funktion...
Sub utFormOnTop(F As Form, ByVal OnTop%)
Dim R As utRect
Call utGetWindowRect(F.hwnd, R)
If OnTop% Then
Call utSetWindowPos(F.hwnd, HWND_TOPMOST, R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top, 0)
Else
Call utSetWindowPos(F.hwnd, HWND_NOTOPMOST, R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top, 0)
End If
End Sub