Click here to Skip to main content
15,887,436 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i kinda got an idea, to make a app similar to cmd prompt, but this is for my own purpose, to make my life a lot easier, for example, the app i will use for everything on my pc no need to explain but, i kinda started and i got stucked from start, basically the form has 1 richbox and 1 textbox, the richbox is like the screen of the cmd prompt, and in the textbox you enter commands, but how to make the textbox to recognize parameters for command?! for example if i want to open a directory for given location, i would need to write "/opendir "c:\windows\fonts"", but how to do this? since i started recognizing commands using switch, i guess you understand me, if not ask me for more info, i kinda feel dumb right now .. anyway thanks in advance.
Posted
Comments
Tomas Takac 15-Dec-14 18:16pm    
You should show a sample of the code you have now to process the commands.
SrgjanX 15-Dec-14 19:07pm    
like to code: http://pastebin.com/PcAWmG03
BillWoodruff 15-Dec-14 21:33pm    
Have you thought about using an actual Console.Window that interacts with your WinForms app ?
BacchusBeale 15-Dec-14 21:41pm    
I would create a Process and use ProcessStartInfo to run cmd and add the commands as arguments. Then redirect the output so you can read the results.
Jim Meadors 16-Dec-14 1:14am    
There are a couple of good articles on CP that you should be able to find on search of "command prompt" in the search box. They give examples of the code expressed by BacchusBeale above. They should get you going in the right direction.

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