Nøjagtigt, hvad jeg behøvede tusind tak. Hmm... det ser ikke ud til at jeg har mulighed for at give dig dine velfortjente point lige nu. Af en eller anden grund er pointtildelingen ikke tilsyne lige nu. Prøver lige at opdatere billedet.
'----------------------------- Øverst i Form1 eller Module1 ----------------------------- Option Explicit
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" ( _ ByVal hWnd As Long, ByVal wMsg As Long, _ ByVal wParam As Long, lParam As Any) As Long
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
Public Function AlwaysOnTop(frm As Form, Optional TopMost As Boolean = True) AlwaysOnTop = SetWindowPos(frm.hWnd, IIf(TopMost, -&H1, -&H2), 0, 0, 0, 0, &H2 Or &H1) End Function '----------------------------- Øverst i Form1 eller Module1 -----------------------------
'---------------------------------------- Form1 ----------------------------------------- Private Sub Check1_Click() 'CheckBox AlwaysOnTop Me, CBool(Check1.Value) End Sub '---------------------------------------- Form1 -----------------------------------------
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" ( _ ByVal hWnd As Long, ByVal wMsg As Long, _ ByVal wParam As Long, lParam As Any) As Long
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.