Happy Codings - Programming Code Examples
Html Css Web Design Sample Codes CPlusPlus Programming Sample Codes JavaScript Programming Sample Codes C Programming Sample Codes CSharp Programming Sample Codes Java Programming Sample Codes Php Programming Sample Codes Visual Basic Programming Sample Codes


Visual Basic Programming Code Examples

Visual Basic > Applications VBA Code Examples

Put your application on top

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Put your application on top Declare Function SetWindowPos Lib "User" (ByVal hWnd as Integer, ByVal hWndinsertafter as Integer, ByVal x as Integer, ByVal Y as Integer, ByVal cx as Integer, ByVal cy as Integer, ByVal wFlags as Integer) as Integer Global Const HWND_TOPMOST = -1 Global Const HWND_NOTOPMOST = -2 Sub MakeTopMost (frmForm as Form, LX%, LY%, RX%, RY%) dim succes as Long succes = SetWindowPos(frmForm.hWnd, HWND_TOPMOST, LX%, LY%, RX%, RY%, 0) End Sub Sub UnMakeTopMost (frmForm as Form) dim succes as Long succes = SetWindowPos(frmForm.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, 0) End Sub Return