0002 Windows Sidebar (transparente Formen)
![]() |
Windows Vista Sidebar im Eigenbau Ausserdem unterstützt das Beispiel den Transparenzeffekt für Formen! Das Handling in ist einem eigenständigen Modul abgelegt und kann und darf so direkt für eigene Anwendungen genutzt werden... |
|
Autor: gino dola |
0001 Always on top
![]() |
Mit der folgenden Funktion läßt sich eine Form dauerhaft im Vodergrund halten. Diese Eigenschaft kann für die entsprechende Form mit dem Parameter True / False ein- bzw. ausgeschaltet werden. Um die Funktion zu nutzen muß die API-Deklaration "SetWindowPos" im Quellcode eingebunden sein: ' Deklaration:
Private Declare Function SetWindowPos Lib "user32" ( _
ByVal hWnd As Long, ByVal hWndInsertAfter As Long, _
ByVal X As Long, ByVal Y As Long,
ByVal W As Long, ByVal H As Long, _
ByVal wFlags As Long) As Long
Const conHwndTopmost = -1
Const conHwndNoTopmost = -2
' Setzt eine Form permanent in den Vordergrung (prop=True)
' prop=False schaltet diese Eigenschaft wieder aus
Public Sub always_on_top(ByVal hwnd As Long, ByVal prop As Boolean)
Dim mode As Long
mode = IIf(prop, conHwndTopmost , conHwndNoTopmost ) ' Effekt ein- / ausschalten
SetWindowPos hwnd, mode, 0, 0, 0, 0, &H13
End Sub
' Aufruf:
always_on_top (Me.hwnd, True)
|
|
Autor: ralf schlegel |


