6

I've been looking at how you can Embed a command prompt window into a WinForm.

I have it working from many examples that use pinvoke but I want to be able to lock the command prompt window in a strict position within the form that the end_user is unable to move.

Is this possible?

The reason behind doing this is because we use Remote tools over a large network and you can have many of these tools open in your session at once. I want to try and bring them all into one space where possible.

Thanks

Derek
  • 8,300
  • 12
  • 56
  • 88

1 Answers1

0

If all you want is a clean interface, you could instead use a couple textboxes in the form. In one of them the user inputs commands. You then pass those commands to the shell. The second textbox is a multiline one where you append what the shell echoes in response to the passed commands. You have more control over the graphical layout that way.

Geeky Guy
  • 9,229
  • 4
  • 42
  • 62
  • hi @Renan, Kindly provide me with an example on how to do this. I am looking for the same thing. – RealSollyM Sep 06 '16 at 16:49
  • @SollyM the explanation would be too long for a comment. I encourage you to open a new question regarding this. Something along the lines of "how to issue commands to cmd.exe and read their output in a Windows Forms application". – Geeky Guy Sep 06 '16 at 17:07
  • Thanks for a quick response. I will do that in the morning. I saw one old post that I want to try with the `CommandLine.cs` class. – RealSollyM Sep 06 '16 at 17:18