#1
|
|||
|
|||
Screencapture on exit
Hi all,
I have an application in windowed mode that allows users to create some stuff and save a screenshot of it (along with some other data) by pressing an on-screen button. However, I want to make the program foolproof by having it also save a screenshot whenever the user accidentally clicks the X button on the top right of the window, without hitting the save button beforehand. The problem of course being that viz.window.screenCapture needs another frame to caputure, while the window gets closed immediately upon forcequit. I can still save out the data with an exit event, but not the screenshot. Is there a workaround to this, other than to stress users to save before quitting or removing the window border so users are forced to exit through script (so I can call the screencap before viz.quit() )?? The latter would kinda suck because I like to be able to resize the window. |
#2
|
|||
|
|||
There is no built-in way to accomplish this with Vizard 3. You might be able to use the pywin32 library to hook the Vizard window and intercept the close button action.
With Vizard 4 you can intercept the clicking of the close button and implement the behavior you want. If you ever decide to upgrade I can provide some sample code. |
#3
|
|||
|
|||
Alright, thanks for your answer!
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
User-Interface | Johannes | Vizard | 51 | 06-06-2006 08:42 AM |