Microsoft Animation Control
-
I am using a the Microsft Animation Control to play a status animation and would like to know if there is a .NET version of this control or something like it that someone has made because COM is Butt-Slow. Or if someone has a better way todo this using anything please tell me. TIA
-
I am using a the Microsft Animation Control to play a status animation and would like to know if there is a .NET version of this control or something like it that someone has made because COM is Butt-Slow. Or if someone has a better way todo this using anything please tell me. TIA
What kind of animation does it play? Is it an AVI file? greetz ;-) *Niels Penneman*
Software/Dev Site
Personal Site
-
I am using a the Microsft Animation Control to play a status animation and would like to know if there is a .NET version of this control or something like it that someone has made because COM is Butt-Slow. Or if someone has a better way todo this using anything please tell me. TIA
FYI, most controls in the .NET Base Class Library (BCL) are just wrappers for the Windows Common Controls or - in some cases (like with the
WebBrowser
control in .NET 2.0) - are just out-of-the-box COM interop classes. You could try searching CodeProject or google the 'net for examples, but most likely these will just encapsulate native functionality anyway. The beauty of .NET is that you don't have to create everything from scratch. You might also check out the Managed DirectX class at http://msdn.microsoft.com/directx[^]. Implementing this is non-trivial so be sure to read the documentation. There's also a couple articles here on CP, though the ones I've seen don't deal with animation besides sprites (sequence of static images). If you need the status animation to play immediately, one alternative might be to instantiate the control and load the animation when the class that uses it is initialized, making sure that the animation is in the stopped state. When you need to show it, make the control visible and start the animation. When finished, stop the animation and hide the control and don't dispose it if you'll need it again. You'll get a faster response this way and the user will see immediately that something is going on. Of course, don't forget to set the wait cursor for further affect (and to stop processing mouse messages) usingCursor.Current = Cursors.WaitCursor
. Don't forget to set it to the default again when done. Just my $0.02 to add to the user experience.-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----
-
FYI, most controls in the .NET Base Class Library (BCL) are just wrappers for the Windows Common Controls or - in some cases (like with the
WebBrowser
control in .NET 2.0) - are just out-of-the-box COM interop classes. You could try searching CodeProject or google the 'net for examples, but most likely these will just encapsulate native functionality anyway. The beauty of .NET is that you don't have to create everything from scratch. You might also check out the Managed DirectX class at http://msdn.microsoft.com/directx[^]. Implementing this is non-trivial so be sure to read the documentation. There's also a couple articles here on CP, though the ones I've seen don't deal with animation besides sprites (sequence of static images). If you need the status animation to play immediately, one alternative might be to instantiate the control and load the animation when the class that uses it is initialized, making sure that the animation is in the stopped state. When you need to show it, make the control visible and start the animation. When finished, stop the animation and hide the control and don't dispose it if you'll need it again. You'll get a faster response this way and the user will see immediately that something is going on. Of course, don't forget to set the wait cursor for further affect (and to stop processing mouse messages) usingCursor.Current = Cursors.WaitCursor
. Don't forget to set it to the default again when done. Just my $0.02 to add to the user experience.-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----