プロセスの終了を待つ「WaitForExit()」の用法
Private Sub Button040521_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button2.Click Dim info As ProcessStartInfo = New ProcessStartInfo info.FileName = "notepad.exe" info.Arguments = "c:\hoge.txt" info.RedirectStandardOutput = True info.UseShellExecute = False Dim p As Process = Process.Start(info) Me.Visible = False p.WaitForExit() Me.Visible = True End Sub