Board index » delphi » TAnimate oddity

TAnimate oddity


2003-07-18 11:14:29 PM
delphi152
i'm running into a strange behavior with TAnimate that i can not explain.
i have several applications, that use a common unit to do the following:
- show a modal form with a TAnimate on it
- load an AVI from a resource
- do some lengthy blocking work
- hide & destroy the form.
in some of my apps, the TAnimate spawns a thread and starts animating just
fine, even while the vcl thread then proceeds with the wok and blocks. in
some other apps, no thread is launched, and the animation only moves
whenever the vcl thread calls Application.ProcessMessages during the work.
i can see absolutely no difference between the two apps, as far as this is
concerned (and all use the exact same unit that has the modal form and avi;
they also use the exact same avi).
in all cases, i can trace up to TAnimate.Play, which drops off the ACM_PLAY
message to the Win32 control; but in some cases this simply does not spawn a
new thread.
any ideas?
--
marc hoffman
elitedevelopments software
www.elitedev.com
"When two events occur simultaneously pertaining to the
same object of inquiry, one must always pay strict attention."
 
 

Re:TAnimate oddity

Quote
any ideas?
fwiw, i found the issue. from MSDN:
ACS_TIMER
By default, the control creates a thread to play the AVI clip. If you set
this flag, the control plays the clip without creating a thread; internally
the control uses a Win32 timer to synchronize playback. Comctl32.dll version
6 and later: This style is not supported. By default, the control plays the
AVI clip without creating a thread.
i'm running with themes turned off, so i didn't at first thing of this even
after reading the above blob, but it turns indeed out that those apps that
didn't work had a manifest, and the others didn't. Now the questioon remains
why Microsoft made such a imho completely senseless desing change for 6.0...
:-(
--
marc hoffman
elitedevelopments software
www.elitedev.com
Everything is useless
Nothing works at all
Nothing ever matters
Welcome to the fall