![]() |
Always on top
Wie kann ich einem Programm das mit VisualBasic progammiert ist sagen das es immer ontop sein soll.
Kurze Beschreibung: hab mir eine soart zweite Taskleiste Programmiert aber wenn ich jetzt ein Programm starte dann verschwindet sie hinter dem Programm! Oder noch besser wäre eine möglichkeit sie fix an den Desktop zu binden! |
Ich habe folgendes von http://www.experts-exchange.com/Prog...ing_Languages/ Visual_Basic verwendet:
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, y, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long Private Const HWND_TOPMOST = -1 Private Const HWND_NOTOPMOST = -2 Private Const SWP_NOMOVE = &H2 Private Const SWP_NOSIZE = &H1 Private Const TOPMOST_FLAGS = SWP_NOMOVE Or SWP_NOSIZE Public Sub MakeNormal(hwnd As Long) SetWindowPos hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, OPMOST_FLAGS End Sub Public Sub MakeTopMost(hwnd As Long) SetWindowPos hwnd, HWND_TOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS End Sub 'Put this in your form_Load() Call MakeTopMost(hwnd) 'If you wanna to be normal put 'Call MakeNormal(hwnd) |
Danke geht einwandfrei!
|
ein tip:
zwischendurch auch mal immer wieder aufrufen weil es andere apps gibt die sich dann doch noch "drüber" legen. Mit dem zwischendurch-aufruf verhinderst das :) |
Alle Zeitangaben in WEZ +2. Es ist jetzt 06:05 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag