Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ps As New Process()
ps.StartInfo.FileName = "calc.exe"
Button1.Text = "電卓実行中…"
ps.Start()
TextBox3.Text = ""
'System.Diagnostics.Process.Start("calc.exe")
System.Threading.Thread.Sleep(1000)
System.Windows.Forms.SendKeys.Send(TextBox1.Text)
System.Windows.Forms.SendKeys.Send("*")
System.Windows.Forms.SendKeys.Send(TextBox2.Text)
System.Windows.Forms.SendKeys.Send("=")
System.Windows.Forms.SendKeys.Send("^c")
While Not ps.HasExited
System.Threading.Thread.Sleep(500)
Application.DoEvents()
End While
If Clipboard.ContainsText() Then TextBox3.Text = Clipboard.GetText()
Button1.Text = "計算開始"
End Sub