View Single Post
  #1  
Old 05-07-2013, 11:39 AM
Erikvdb Erikvdb is offline
Member
 
Join Date: May 2013
Posts: 63
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.
Reply With Quote