Are you trying to exit your entire application when the key is pressed, or just close the Vizard window?
If you are trying to exit the entire app, then you need to call the Close() method of your MainFrame class.
If you want to just close the Vizard window, then this is not possible. You can only call viz.go() once, so you can only create a single Vizard window for the duration of your script. To deal with this limitation you can create the Vizard window during startup and make the window visible/hidden to simulate creating/destroying the window.
|