How to use it.
The component is a BitBtn descendent. Add it to any form. Click it and it
will open a DOS window in the current directory. The caption on the button
will change from "Start" to "Cancel" Close the DOS window by typing "exit"
on the command line and the button caption will change back. If you click
the button while it says "Cancel" it will close the DOS window after you
confirm. There are a plethora of options. Keep reading.
What has been added.
Properties
CommandLine
Path\Filename to be started. Default="COMMAND.COM"
Example: "c:\editors\win\UltraEdit\UEdit win.ini"
WorkingDir
Working directory for the program. Default="." {current directory}
Example: "c:\Windows"
WaitForReturn
If "true" button caption will change to CancelCaption property and glyph
will change to CancelGlyph property. When program finishes caption and
glyph are restored and the OnProcessReturn event is triggered. If "False"
button doesn't change. Every click creates a new instance. Default="true"
CancelCaption
Button caption while waiting for process to terminate. Default="Cancel"
CancelGlyph
Button glyph while waiting for process to terminate. Default is none
CancelWarning
The program should be terminated normally. Clicking the button while
waiting will summarily close it losing all unsaved data. This is the
warning message displayed in the confirmation.
DisplayCancelWarning
If "false" the cancel warning will be suppressed. Default="true"
Events
OnProcessReturn
This event is triggered when the process is terminated. The boolean
variable "Normal" is "false" if the process was canceled.
OnStartFail
This event is triggered if the process failed to start.
OnCancelFail
This event is triggered if the cancelling the program failed.