I'm not quite sure if this should be a FAQ, but thought I might share this anyway. It's a (relatively) full command-line prompt running on a form using a TMemo, TCombobox, and TButton. The form is rigged to let the controls work much like a real command-line prompt. But you will find a few little glitches relating to the change of place (TMemo doesn't work like a console).
The big draw (of course) is that it's a demo of the use of named pipes in a program. I tested it against everything I could think of, but that doesn't mean that there isn't something wrong with it that I don't already know about.
Things to Know If you Don't read the source before playing with this:
1) I added a couple of commands which address the TMemo directly. These are "CLR" - clears the memo and "savelog" which saves the TMemo to a text file.
2) Again, some things might look funny because of how they draw to the console. This will be because TMemo works different and there's no formatting done in this code.
3) The attempt was made to not let you exit out of the command-line prompt without exiting the program. The problem comes in having the user shell to another command-line prompt - the method used isn't precise.
Here's the download, hope it's useful to someone!
MemoCommand.zip
It is not possible for anyone to acknowledge truth when their salary depends on them not doing it.
The big draw (of course) is that it's a demo of the use of named pipes in a program. I tested it against everything I could think of, but that doesn't mean that there isn't something wrong with it that I don't already know about.
Things to Know If you Don't read the source before playing with this:
1) I added a couple of commands which address the TMemo directly. These are "CLR" - clears the memo and "savelog" which saves the TMemo to a text file.
2) Again, some things might look funny because of how they draw to the console. This will be because TMemo works different and there's no formatting done in this code.
3) The attempt was made to not let you exit out of the command-line prompt without exiting the program. The problem comes in having the user shell to another command-line prompt - the method used isn't precise.
Here's the download, hope it's useful to someone!
MemoCommand.zip
It is not possible for anyone to acknowledge truth when their salary depends on them not doing it.