VB: Form 'nur im Vordergrund'

Hallo Leute,

ich möchte, das ein Fenster meiner Software ständig im Vordergrund angezeigt wird.
Wie realisiert man das unter VB ?

Danke,
Swen

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 SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
Private Const HWND\_TOPMOST = -1

Private Const SWP\_NOMOVE = &H2
Private Const SWP\_NOSIZE = &H1


Call SetWindowPos(Me.hwnd, HWND\_TOPMOST, 0, 0, 0, 0, SWP\_NOMOVE Or SWP\_NOSIZE)
Call SetForegroundWindow(Me.hwnd)

The SetWindowPos function changes the size, position, and Z order of a child, pop-up, or top-level window. Child, pop-up, and top-level windows are ordered according to their appearance on the screen. The topmost window receives the highest rank and is the first window in the Z order.

The SetForegroundWindow function puts the thread that created the specified window into the foreground and activates the window. Keyboard input is directed to the window, and various visual cues are changed for the user. The system assigns a slightly higher priority to the thread that created the foreground window than it does to other threads.

greets from MichL (Vienna)