WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-07-2013, 12:39 PM
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
  #2  
Old 05-09-2013, 09:59 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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.
Reply With Quote
  #3  
Old 05-13-2013, 07:33 AM
Erikvdb Erikvdb is offline
Member
 
Join Date: May 2013
Posts: 63
Alright, thanks for your answer!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
User-Interface Johannes Vizard 51 06-06-2006 08:42 AM


All times are GMT -7. The time now is 11:22 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC