Question External application screen position

d_a_r_k

Member
Joined
Oct 30, 2010
Messages
19
Programming Experience
Beginner
Hello, how can I make load "DXSETUP.exe" at center screen position using this code? Thanks.

VB.NET:
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
 
Back
Top