·  Start ·  Programme ·  Codes ·  Tipps ·  ActiveX ·  Tutorials · 



Für diesen Tip brauchen Sie ein Formular, eine Checkbox und einen Timer.

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 
Const SWP_NOMOVE = &H2
Const SWP_NOSIZE = &H1
Const SWP_SHOWWINDOW = &H40
Const HWND_TOPMOST = -1
Const HWND_NOTTOPMOST = -2

Private Sub Form_Load()
    Timer1.Interval = 300
End Sub 

Private Sub Timer1_Timer()
'allways on top 
    If Check1.Value = 1 Then 
        SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE + SWP_NOMOVE
    ElseIf Check1.Value = 0 Then 
        SetWindowPos Me.hwnd, HWND_NOTTOPMOST, 0, 0, 0, 0, SWP_NOSIZE + SWP_NOMOVE
    End If 
End Sub 
Aktualisiert: 12.02.2008, 14:11 Uhr Copyright © 2001 - 2010 by ST-software Navigation zurück  |  Navigation vorwärts  |  Zum Seitenanfang     
Ihre IP: 38.107.191.84 ·  Seite erstellt in: 0.848 Sekunden ·  Dateigröße:  2687 Bytes