Quote:
Originally Posted by KingZuck
siehe anhang :D
|
Das cmd fenster ist aber net in die Form eingebunden sondern erscheint extra?...
EDIT:
Warum machste nicht einfach
Shell("Der befehl") ?
Damit direkt nachdem du auf den Button drückst text in der Console erscheint
einfach
Sendkeys.Send ("Befehl...")
so sieht das dann aus wenn das da noch zu ist..
Code:
Public Class Form1
Private Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As Integer
Private Declare Function MoveWindow Lib "user32" (ByVal hwnd As IntPtr, ByVal x As Integer, ByVal y As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal bRepaint As Integer) As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim p As Process = System.Diagnostics.Process.Start("cmd")
SetParent(p.MainWindowHandle, Me.Handle)
MoveWindow(p.MainWindowHandle, 0, 30, 50, 50, 1)
SendKeys.Send("MSG * HI")
End Sub
End Class