MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
Private Const SWP_NOMOVE = 2 Private Const SWP_NOSIZE = 1 Private Const Flags = SWP_NOMOVE Or SWP_NOSIZE Private Const HWND_TOPMOST = -1 Private Const HWND_NOTOPMOST = -2 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 Sub SetWindowOnTop(ByVal p_hWnd As Long, Optional ByVal p_bOnTop As Boolean = True) If p_bOnTop Then Call SetWindowPos(p_hWnd, HWND_TOPMOST, 0, 0, 0, 0, Flags) Else Call SetWindowPos(p_hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, Flags) End If End Sub Calling it like this: Call SetWindowOnTop(Me.hWnd, True)
|vb6 programatically bring window to front||8||74|
|How to create a duplicate finder Application||9||122|
|maro to copy and paste from one worksheet to another based on a condition||11||54|
|Access 2013 combo box not working||3||51|