Sub AlwaysOnTop (frmIn As Form, flgOnTop%) If flgOnTop Then SetWindowPos frmIn.hWnd, -1, 0, 0, 0, 0, &H1 Or &H2 Else SetWindowPos frmIn.hWnd, -2, 0, 0, 0, 0, &H1 Or &H2 End If End Sub