|
-
Mar 12th, 2001, 12:46 AM
#1
Thread Starter
Lively Member
can any body please give me some idea how to bring to front an application which is running on the background ? (Using VB 5)
Thanks in advance
Ram
-
Mar 12th, 2001, 12:49 AM
#2
frmMain.ZOrder vbBringToFront
or
AppActivate Titlebar Contents of App Here
I don't know what works in VB5
but AppActivate doesn't un minimize a minimized app.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Mar 12th, 2001, 12:58 AM
#3
Code:
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const SWP_NOACTIVATE = &H10
Const SWP_SHOWWINDOW = &H40
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, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
End Sub
'Code improved by vBulletin Tool (Save as...)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|