Loading...

VB6 Form Unload crash after playing gif file

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

VB6 Form Unload crash after playing gif file

Postby wpn » Wed Mar 02, 2011 1:13 am

Hallo,

In our app. we have created a form that is used as an hourglass. On Load it loads an animated gif from a resource file using 'DisplayFromByteArray'. When the user has to wait the form is shown and the gif is started with the .PlayGif method. When the user has waited enough, animation is stopped with th e.StopGif method and the form is hidden. This all works ok. When the app is being closed the QueryUnload event triggered in the hourglassform does a .StopGif to stop animation of the gif (if not already stopped). After that the app hangs and/or crashes the IDE. What is the best way of closing the form when a gif has been played? We use VB6 SP6 and runs on a quadcore XPprof system.

Thanks,
Wim
wpn
 
Posts: 4
Joined: Wed Mar 02, 2011 1:01 am

Re: VB6 Form Unload crash after playing gif file

Postby Loïc » Wed Mar 02, 2011 7:36 pm

Hi Wim,

maybe you have to close the image before releasing your form. See CloseImage function.

Anyway, I am not able to reproduce such problem. if you can reproduce it is a standalone application, you can send it to http://support.gdpicture.com for investigation.

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4437
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: VB6 Form Unload crash after playing gif file

Postby wpn » Thu Mar 03, 2011 10:38 pm

Hello Loïc,

Already extracted the code into a test project and in that project it works without a problem. But after a long debugsession I found a workaround. I do not understand why it works but maybe you can get some extra information from this workaround. Normally when the application is closed by the user the program runs a little loop through the forms collection and unloads all forms in the forms collection. When all forms are unloaded Windows automatically end the program. But when I close the frmHourglass form when it is not needed anymore so it is not in the forms collection when the program is stopped by the user it works ok.

BTW Is it possible to add the possibility to load a file into the control at designtime? This can be handy when you want to use the control to display a fixed logo or so. Then you do not have to use the resource editor to include the data for the picture.

Thanks
wpn
 
Posts: 4
Joined: Wed Mar 02, 2011 1:01 am


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest