Groups | Blog | Home
all groups > dotnet compact framework > january 2008 >

dotnet compact framework : Forms transitions and animation?


mrabie
1/11/2008 4:16:40 PM
Hi,

I am writing an application where i want to do nice transition
effects, i thought of the following,
1) Main form1 is loaded and shown on screen
2) Load form2 in an offscreen buffer
3) capture bitmap image of the form (after the form has been loaded in
the offscreen buffer)
4) capture bitmap image of form1
5) make transition effect by double buffering

the problem is that i am not able to load the form into an offer
screen buffer... is that possible?

the other idea i thought about is to follow the same steps above but
instead of loading the form in an off screen buffer, i load the form
and setting the bounds to out of the screen and then capture the image
but i get a blackscreen when this is done. e.g

form2.location = new Point(240,0);
form2.Show();

Bitmap Snapshot = this.SnapShot(gxbuffer, new
Rectangle(240,0,240,320);

any ideas or help would be really appreciated

mrabie
1/11/2008 4:18:50 PM
[quoted text, click to view]

also what's the best way to show the transition without flikering? and
transition code or sample would be great.

ctacke/
1/11/2008 7:40:44 PM
Take a look at FlowFX:
http://community.opennetcf.com/competition/folders/sept07/entry15.aspx

It probably does everything you need, source included.


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com




[quoted text, click to view]

Simon Hart [MVP]
1/13/2008 12:34:01 PM
Usally override the OnPaintBackground event, but do nothing. Leave the
painting to the WM_PAINT event.
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com


[quoted text, click to view]
mrabie
1/14/2008 12:16:38 AM
[quoted text, click to view]

Well i took a look at FlowFX wonderful app, i learned a lot from it
especially how to make the actual transiotion effect. what he does is
that he captures an image of a blank form (and if the new form has a
bg color he adds the bg color to the buffer while in transition), but
not actually getting the form with all it's controls over it, eg. if i
have a picturebox on Form2 it wont show up in the transition, only
after the transition is over and the form is loaded onto screen, the
controls start rendering over it.
Any ideas how to reach it?

AddThis Social Bookmark Button