It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

External application window position

Moderator: dafunkymunky

External application window position

Postby dundukas on Thu Nov 04, 2010 5:01 pm

Hello, I'm working on some project and I need your help guys. I'm just a beginner. I searched the forums for a related topic but couldn't found any resolved answer. So how can I fire my external application "DXSETUP.exe" at center screen position using this code? Thanks.

Code: Select all
Private Sub Panel3_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel3.MouseClick
    Try
      Me.Hide()
      Threading.Thread.Sleep(2000)
      With dx.StartInfo
        .UseShellExecute = True
        .FileName = Application.StartupPath & "\redist\directx_Jun2010_redist\DXSETUP.exe"
      End With
      dx.Start()
      dx.WaitForExit()
      dx.Close()
      Threading.Thread.Sleep(2000)
      Try
        Shell(Application.StartupPath & "\Setup.exe", vbNormalFocus)
      Catch ex As Exception
        gui_error1.ShowDialog()
      End Try
      Application.Exit()
    Catch ex As Exception
      gui_error2.ShowDialog()
    End Try
  End Sub
dundukas
 
Posts: 1
Joined: Thu Nov 04, 2010 4:42 pm

Who is online

Users browsing this forum: No registered users and 7 guests