Environment.ExitCode

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spdjm
    New Member
    • Oct 2007
    • 1

    Environment.ExitCode

    Good Afternoon,

    I have a Windows form that is kept invisible and used in a batch process. If I encounter and error I set the Environment.Exi tCode to a non-zero value. I found that the value does not display in my Output Window during debugging. I use 'End' to terminate the process when a non-zero Environment.Exi tCode exists.

    Second, when I change the code so 'End' is not used and 'Exit Sub' is used in the 'Load' subroutine of the form, the form displays and on closing the form the correct error code displays in the Output Window. Is there a method for assuring the exit code is passed back to the operating system when the form is not visible?

    Take Care,
    Dave
Working...