I asked a question about moving images with timer in c# . Some people said 开发者_运维百科to me to use WPF. But I never worked with WPF before. I looked msdn but don't understand it. Please help me, I really need this soon.
I would suggest you to have a look at Expression Blend video tutorial. Learning and implementing wpf without out tools like Expression Blend is quite challenging. http://expression.microsoft.com/en-us/cc197141.aspx
In short, in WinForms (I assume you use WinWorms when you don't use WPF) to animate some elements on the screen, so the following:
- Override the forms OnPaint method, and inside there, draw the image(s) on the desired positions.
- Make a backgroundworker tat support sending progress.
- In the backgroundworker calculate the new positions, then call ReportProgress.
- In the report progress event method, redraw the images on their new positions.
- Remember to set the forms DoubleBuffered property to true so that the redrawing is done smoothly.
Good luck! :)
精彩评论