You can shorten your code down to:
Code:Private Declare Sub 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) Private Sub Form_Activate() 'Set the window position to topmost SetWindowPos Me.hWnd, -1, 0, 0, 0, 0, 3 End Sub




Reply With Quote