Click here to Skip to main content
15,918,404 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
How do you display open command window from .net 2008
Posted
Comments
Sergey Alexandrovich Kryukov 20-Mar-11 22:44pm    
There is no such thing
--SA

Instead of trying to invoke the Run window, consider creating a small window of your own for the command input and then using the static System.Diagnostics.Process.Start method.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 20-Mar-11 22:45pm    
5 assuming the question was about "CMD".
--SA
Wendelius 21-Mar-11 5:45am    
Thanks, yes you're right that was an assumption, not necessarily the original case OP had in mind.
VB
Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim temp As Integer
        temp = Shell("\windows\system32\cmd.exe", AppWinStyle.NormalFocus)
        MsgBox(temp)
    End Sub
End Class


Will this do?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900