NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Receiving an error closing program calling Teststand from C# on XP

I've got a program that calls Teststand and when I shut down the program I receive the generic Windows has encountered a problem error. I only receive this on XP, not on Windows 7. In my code, for the Form Close event, I have the following code:

 

axApplicationMgr1.Shutdown();

Application.Exit();

 

Is there something more that I need to do to close down Teststand properly so I don't get the error?

 

Thanks.

0 Kudos
Message 1 of 2
(2,980 Views)

You should consider using the operator interface examples that are shipped with TestStand which includes a C# UI and goes into details for how the MainForm_Closing operation is handled as well as if the form is closing as a result of Windows shutdown. I think it is possible in this case that the axApplicationMgr.Shutdown() starts a shutdown sequence and the Application.Exit() command automatically closes the app without the shutdown sequence finishing.

Ian M.
National Instruments
0 Kudos
Message 2 of 2
(2,946 Views)