 |
|
|
 |
|
 |
Great library and have used it for a while now, however, my company are now upgrading to windows 7 and this effect no longer works correctly are you planning on updating it to work with Windows 7 or should i just go ahead and use the in built animation support in Windows 7.
Cheers.
|
|
|
|
 |
|
 |
Well, first and foremost, I'm glad that someone is still utilizing the code that I wrote long ago (more than 3 and a half years now).
Now, coming to the point, your post has really ignited my desire to update the library to work with Windows 7. But, when I think of some really nice upgrades that have happened to .Net and Windows, its easier (perhaps better as well) to imitate the animations with things like WPF, Silverlight, widgets. In fact the UIs provided by the new versions of the OS might easily better my code (which is again based on Windows' native code only ).
But, having said that, I'll certainly give it a try and hopefully come back with something nice.
Thanks,
Dhimant
|
|
|
|
 |
|
 |
Hi;
Given code is very useful. i would like to know how to use AW_HIDE control at form closing time. actually i want to open & close the same form in animated fashion on a button click event.
so, guide me how to create animation effect at form closing time.
Thanks in advance.
|
|
|
|
 |
|
 |
simple but educational.
|
|
|
|
 |
|
 |
Hi Dhimant
Good work
It makes issue when animated form's WindowState is Maximize,
animation is not worked.
any way its not a big issue
Thanks for sharingLife's Like a mirror. Smile at it & it smiles back at you.- P Pligrim
|
|
|
|
 |
|
 |
I am Adding a UserControl to a Panel in C# windows form.
The Animation feature which you have given is really nice. But that is working for a new form. But I need to make the same animation for a usercontrol.
|
|
|
|
 |
|
|
 |
|
 |
It doesn't work in mobile devices.
How can I do to make it work in mobile devices?
thanks
|
|
|
|
 |
|
 |
Hi, the form open works and looks great.
I am trying to use the same technique to close the form. I uncommented your code in the CLOSE button on the animatedForm:
flags -= WinAPI.AW_ACTIVATE;
flags += WinAPI.AW_HIDE;
WinAPI.AnimateWindow(this.Handle,animationTime,flags);
But the form drags itself on the screen. It seems like the form is being dragged as it is closing (similar to when your computer is not responding and you move a form around.
Any ideas on how to fix this?
thanks
|
|
|
|
 |
|
 |
some1s69 wrote: But the form drags itself on the screen. It seems like the form is being dragged as it is closing (similar to when your computer is not responding and you move a form around.
Any ideas on how to fix this?
Yes, I saw that. I tried a few alternative properties of the form but couldn't make it behave the way it should. I'll continue searching for that and if found then post it here.
Below are some of the points that I've noticed to summarize the behavior at the time of form closing. You may add up some more items on the basis of your experience with the application/functionality. The list of course denotes only what works well and what not, and the discussion point here is still an unexpected behaviour.
1. All the four types of animation works well ( LtoR, RtoL, TtoB and BtoT ) only when the slide effect is on. The Fade Effect also works well.
2. This means, the all the four effects ( LtoR, RtoL, TtoB and BtoT ) do not work well at closing, if the slide effect is not on with them. The Collapse effect also does not work well at the time of closing. By "do not work well" I mean that the form does not animate as per the effect specification. It just gets disappeared after the animation duration. There is no runtime error or something like that, it just doesn't behave in an expected/presumed way.
Thanks,
Dhimant
|
|
|
|
 |
|
 |
First of all, thanks to dhimant for a wonderfull introduction in form animations.
Please help..
I have used opacity for my forms combinded with animations. When the form shows for the first time, the animation shows 2 layers, one with solid gray background, and the other with the opacity background. At the second show, the animation shows only the opacity layer, as it shoud be.
I tried to hide the form at first show unsuccessfully. Can anybody help me get rid of this solid background layer when using opacity?..
|
|
|
|
 |
|
 |
Hello,
Again, my apologies for attending this later. This seems to have become the tradition for this article for me to reply later.
Anyways, yes using opacity with animation seems to be causing some problems. I tried to do the same and had similar problems.
One alternative that I tried and succeeded with would be to set the opacity of the animated form in the load event. This of course may not be the complete solution for your problem, but at least doing this animates the form well first and then sets the opacity. Refer below code snippet ( which I suppose is quite simple ).
private void animatedForm_Load(object sender, System.EventArgs e)
{
WinAPI.AnimateWindow(this.Handle, animationTime, flags);
this.Opacity = 0.50;
}
You might already know, we need to provide the value of opacity as a double value ( 1.0 being 100% ). So, the above code will first animate the window and then set its opacity to 50%. We can set the opacity in the respective button click event ( in the parent form ) also, but doing it here will get applied to all the animations and we'll not have to replicate the code for each of the buttons where we need the opacity to be set.
Other suggestions and comments are of course welcome.
Thanks,
Dhimant
modified on Tuesday, January 20, 2009 7:14 AM
|
|
|
|
 |
|
 |
Hi Dhimant .
Are there any Win API's effects except these effects? if so, how can I access them?
Thank you
|
|
|
|
 |
|
 |
Hello,
I apologize for replying late.
As far as other effects are concerned, I don't think there is any effect other than the combinations that I mentioned. I actually took the effects from MSDN itself and then created a UI to allow different combinations to try with. I have not checked for an update on this since long, so if you come across any then please let me know. I'll try and cover them too.
Thanks,
Dhimant
|
|
|
|
 |
|
 |
Nice use of win32 API. A 5 star.
Plz keep posting more.
|
|
|
|
 |
|
|
 |
|
 |
I want to some procedure but web based program....
Sir/Mam,
I'm Kannan.I Like very much CodeProject site
THANKNG YOU
KANNAN
|
|
|
|
 |
|
 |
ravanth wrote: I want to some procedure but web based program....
I'm not sure if I've understood correct, but if you want the same kind of animations in a web application, then I suppose, you can use the freely available ASP.Net AjaxToolkit library. There are also some freely available javascripts that provide similar if not exact kind of animations.
Thanks,
Dhimant
|
|
|
|
 |
|
 |
Thank you Dhimant .
A 5 from me.
|
|
|
|
 |
|
|
 |
|
 |
I know it has been a while since you have posted this sample. Do you have more posts pertaining to the same topic (More animation effects).
Thanks for the time.
Pradeep
|
|
|
|
 |
|
 |
First of all, my apologizes for attending this a bit late. I can't spare enough time to track mails.
I actually tried and covered all the possible combination of effects when I first wrote this article.
I have not looked for any additions to the effects since then, but I suppose as everything is derived from COM itself, the chances of anything being changed are very less. Still, as you've asked it now, I'll definitely try and search for that, and of course post it here if found anything new.
Thank you.
|
|
|
|
 |
|
 |
Hello, and thanks for the article
Why do you call Dispose on the Close event? Can't you call the Close() method?
|
|
|
|
 |
|
 |
Thanks.
I apologize for delay in my reply. We can use close or dispose. If we call the close() method, then also the form gets disposed anyway.
|
|
|
|
 |