tengo un codigo para iniciar un proceso con una ventana sobre poniendola y que cuando se cierre esa ventana se cierre con el proceso que se inicio.
donde hay una parte donde inicia el proceso sin tener una ruta especifica
Código:
Dim programName As String = "SetUp_v100001.exe"
System.Diagnostics.Process.Start(Application.StartupPath & "\" & programName)
pero dentro de este codigo no puedo buscar la forma de que inicie
el proceso de forma maximizada
si les sirve el codigo lo dejo aki
Código:
Public Class SetUp_v101
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim programName As String = "SetUp_v100001.exe"
System.Diagnostics.Process.Start(Application.StartupPath & "\" & programName)
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
Me.WebBrowser1.AllowWebBrowserDrop = True
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Label1.Text = DateString
Label2.Text = TimeOfDay
End Sub
Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
If e.CloseReason = CloseReason.UserClosing Then
If MsgBox("Realmente desea salir?", MsgBoxStyle.YesNo, "Finalizar SetUp") = MsgBoxResult.Yes Then
Application.Exit()
For Each prc As Process In Process.GetProcesses
If prc.MainWindowTitle.Contains("Setup_v100001") Then
prc.Kill()
ElseIf prc.ProcessName = "SetUp_v100001.exe" Then
prc.Kill()
Me.Close()
End If
Next
Else
e.Cancel = True
End If
End If
End Sub
End Class