"Peter Duniho" <(E-Mail Removed)> wrote in message
news

(E-Mail Removed)...
> On Sat, 05 Jul 2008 10:07:24 -0700, Sin Jeong-hun <(E-Mail Removed)>
> wrote:
>
>> By "efficient" I mean less time to start the animation, and less
>> memory & CPU consumptions.
>
> Well, an animated GIF is the best choice there. There's a direct
> correlation between video quality and computational cost, in terms of both
> the size of the code that has to be loaded and the amount of work it has
> to do.
>
>> PictureBox does support animated GIFs but as you may know, GIF only
>> supports 256 colors. So it can't display soft true color animation.
>
> That's true. But for better or worse, I don't think that on Windows,
> people really expect 24-bit UI animations.
I would actually expect a
> 256-bit GIF to be sufficient.
>
>> I'm not sure but I think that avi embedded in the Windows Explorer
>> isn't like those you see on the Internet. I guess it's an uncompressed
>> avi that can be played by Windows API somehow, like BMP.
>
> Well, AVI is just a container format, actually. It's just a specialized
> RIFF format. You'd have to look at the exact format to know exactly what
> they're doing, but there are plenty of lossless video formats that can be
> stored as AVI, including 24 bpp video.
>
>> By "high quality" I mean high quality true color animation. For
>> example, the file copy dialog of Windows Vista shows very soft
>> animations. To show that quality animation to users, I wonder what
>> would professional C# developers do. That's why posted this. Using
>> Managed DirectX is also a good option?
>
> I haven't used Vista enough to have a good idea of what you're talking
> about. The animations I see on XP would be fine as 8-bit. 
>
> As far as Managed DirectX, sure...that may in fact do very well for you.
> Look at the AudioVideoPlayback class for a very easy-to-use video playback
> component. At the very least, I think it should load faster than WMP. 
>
> Pete
Windows (XP) uses a native control called the Animation Control Library
(msdn: http://msdn.microsoft.com/en-us/library/bb761884(VS.85).aspx)
There is a great C# implementation available here:
http://www.codeproject.com/KB/miscctrl/CGAnimation.aspx
There are several limitations to the avi file format, see the msdn
documentation for full details:
An animation control can display an AVI clip originating from either an
uncompressed AVI file or from an AVI file that was compressed using
run-length (BI_RLE8) encoding. You can add the AVI clip to your application
as an AVI resource, or the clip can accompany your application as a separate
AVI file.
Note The AVI file, or resource, must not have a sound channel. The
capabilities of the animation control are very limited and are subject to
change.
The UI thread is running the animation so any work that you want to do while
'playing' the animation must happen in another thread. (e.g. using the
Backgroundworker control or Ascyn webservice calls).
I'm still looking for a tool that can compress the avi file.
Rudi