Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Non-Modal splash form with animation

I looked a your demo splash form with animation, but it uses a modal form.  I tried to use it with a non-modal form, and I get an access violation when closing the form, and in the FormClose event is use Action := caFree (If I don't use caFree, it is fine, but the form doesn't get freed unless I do more work).

The AV occurs in the first line of TLMDFxAnimation.Restore.  Do you know how to avoid this when using a non-modal form with caFree in the FormClose event?

I close the splash using a timer and in the timer I have even tried to disable the one and only LMDFxAnimation entry even though that is the ShowAnimation event and I would not expect it to run on close.

I also do not see the animation when the splash form opens, but I do see it on the close if I don't use caFree.  Not sure why that is yet but could explain the access violation since it appears to run on close instead of on open.

Comments

  • 3 Comments sorted by Votes Date Added
  • Its hard to say something useful, because your issue depends of your application's details. Please send a small isolated demo project to our support email.

    Btw, most probably, the form becomes destroyed before animation fully finishes.
  • I agree that the form is probably destroyed while animation is going on (since not doing a caFree prevents the error)... but I tried to prevent any animation during close which I was not able to do by disabling the animation just before issuing the Close.  Maybe I have to dynamically create and destroy the animation control in code.

    Anyway, first thing my app does is create and show the non-modal splash form while the main app loads (which can take a few seconds).  The splash form has a timer on it to close after a certain amount of time.  However, it seems blocked while the main app loads and the timer doesn't kick in until the main form fully loads, which is fine but probably why I do not see the animation when the splash form is first shown.

    I also changed it to not close via the timer, but rather to start the animation when the timer triggers and close the splash form when the animation finishes.  But I still get the error.

    Same problem occurs with a very similar control from AlmediaDev.

    I'll try to put a sample demo together which will explain my scenario better.  It might take a few days before I have time to get to it (not a high priority at the moment).
  • > I'll try to put a sample demo together which will explain my scenario better.

    Ok. I'm awaiting.
Sign In or Register to comment.