Results 1 to 3 of 3

Thread: bring to front an app

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2001
    Location
    Sri Lanka
    Posts
    66

    Question

    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

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    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

  3. #3
    Guest
    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
  •  



Click Here to Expand Forum to Full Width