locked
Animation Effects on Windows Mobile RRS feed

  • Question

  • I have created a window using the CreateWindow call. In that I have shown some information. Now what I want to do is, if the user clicks on the window and moves the window around then the forum should produce a rubber band effect, that is if I move it from its current location to a different location, it should seem like its stretching and when I release it should come back to its original size.

    Can someone please provide me some information or pointers to start with.

    Thank you,
    CED
    • Edited by C.E.D Tuesday, May 26, 2009 2:09 PM
    Tuesday, May 26, 2009 6:09 AM

Answers

  • It sounds like your expectation is that there is a high level component that you can use to communicate what type of animation that you want and that component will take care of the rest of the details for making the animation happen.  In the Windows world such functionality is only availble through the XAML based APIs.  Those are not yet available on Windows Mobile.

    To get the affect that you are describing you will need to calculate the changes that must be applied to your window and incrementally make those changes (and update the display after each change) over time.  
    Joel Ivory Johnson
    • Marked as answer by C.E.D Tuesday, May 26, 2009 2:32 PM
    • Unmarked as answer by C.E.D Wednesday, May 27, 2009 7:03 AM
    • Marked as answer by C.E.D Thursday, May 28, 2009 3:44 PM
    Tuesday, May 26, 2009 2:24 PM

All replies

  • I have been searching various blogs for my answer too but none had the answer. I found out an API call AnimateWindow but it is not supported in Windows Mobile 6.1, not sure about Windows Mobile 6.5.

    We have been able to achieve the fade effect using the AlphaBlend call.

    Thank you,
    CED
    Tuesday, May 26, 2009 9:44 AM
  • It sounds like your expectation is that there is a high level component that you can use to communicate what type of animation that you want and that component will take care of the rest of the details for making the animation happen.  In the Windows world such functionality is only availble through the XAML based APIs.  Those are not yet available on Windows Mobile.

    To get the affect that you are describing you will need to calculate the changes that must be applied to your window and incrementally make those changes (and update the display after each change) over time.  
    Joel Ivory Johnson
    • Marked as answer by C.E.D Tuesday, May 26, 2009 2:32 PM
    • Unmarked as answer by C.E.D Wednesday, May 27, 2009 7:03 AM
    • Marked as answer by C.E.D Thursday, May 28, 2009 3:44 PM
    Tuesday, May 26, 2009 2:24 PM
  • Thanks for the reply Joel. I was looking for some example implementation cause such won't be supported by Windows API. We could do the fade effect using AlphaBlend function, so we were wondering if we could do any other effects like this on Windows Mobile. Thank you again for the input regarding its implementation. We will try out your suggestion.

    Thank you,
    CED
    Tuesday, May 26, 2009 2:31 PM
  • This is another helpful information regarding the Rubber band effect from Windows. Can use this logic and further modify and implement it.

    http://support.microsoft.com/default.aspx/kb/314945

    Thank you,
    CED
    Tuesday, May 26, 2009 2:37 PM
  • Hi CED,

    Some kind of effects which are relevant are in this samples. Hope they are helpful to you.

    http://www.codeproject.com/KB/mobile/MobilePasswordSafe.aspx

    http://www.codeproject.com/KB/mobile/compframe3.aspx

    Regards,
    Malleswar

    Tuesday, May 26, 2009 2:54 PM
  • Yeah I went through the .NET Compact Framework Animation Control from Microsoft. It provided the great information regarding using GIF for displaying animation.

    Now, is it possible to do fade effect on dynamic screens. We could achieve fade effect on static screen only. For dynamic screen I mean like when the display is in portrait mode and I change it to landscape mode I want to simulate the fade-in and fade-out effect. I was thinking about capturing the screen as a bitmap and doing AlphaBlend on it but it is not possible as the width and height will change.

    Any ideas on how can this be achieved? If I use the way I am doing then I perform the fade effect in portrait mode and show the screen immediately in landscape mode. The fade effect can be performed once I receive the WM_SETTINGCHANGE message with SETTINGCHANGE_RESET.

    Thank you,
    CED
    Wednesday, May 27, 2009 7:01 AM