Click here to Skip to main content
15,170,651 members
Articles / Programming Languages / C#
Article
Posted 31 Jan 2003

Stats

142.7K views
2K downloads
73 bookmarked

Animate the Mainform of your Application

Rate me:
Please Sign up or sign in to vote.
4.88/5 (25 votes)
31 Jan 2003
Shows how to change the visual style of the application form with an animation.

Sample Image - screenshot.jpg

Introduction

I wrote this code, because I'm interested in the new .NET functions which are available to change the look of the form of your application. With the region class and different background images you can easy change the look of forms and controls. I found the great Bitmap2Region class from Arild Fines in the Internet, which I must use in an application. The result is this funny walking rabbit form.

How to use this sample ?

Right click on the rabbit to get the context menu. There you can change the moving speed of the rabbit and quit the program.

Precondition

Enable the using of unsafe code for the Visual Studio .NET project.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Marc Schneider
Web Developer
Germany Germany
I'm currently working as a Computer Science Engineer for a german company which develops gambling machines. I program with VC++ 5.0 + OpenGL ! Privately I'm learning C# and ASP.NET !


Comments and Discussions

 
QuestionLicense? Pin
cgordon_131-Mar-12 5:02
Membercgordon_131-Mar-12 5:02 
Generalseperate source and exe Pin
praveenqwe9-May-06 2:57
Memberpraveenqwe9-May-06 2:57 
Generalnice work go on Pin
Taha Elsayed24-Sep-04 16:23
MemberTaha Elsayed24-Sep-04 16:23 
QuestionMemory leaks??? Pin
trissanen@hotmail.com10-May-04 19:49
Membertrissanen@hotmail.com10-May-04 19:49 
AnswerEh? Pin
The_Mega_ZZTer3-Oct-05 3:18
MemberThe_Mega_ZZTer3-Oct-05 3:18 
Generalalpha blending Pin
Rob Tomson22-Feb-04 22:03
MemberRob Tomson22-Feb-04 22:03 
GeneralThis is great Pin
Agent 862-Jan-04 21:49
MemberAgent 862-Jan-04 21:49 
GeneralRe: This is great Pin
Marc Schneider3-Jan-04 3:10
MemberMarc Schneider3-Jan-04 3:10 
GeneralLayeredWindows Pin
Roger Alsing3-Feb-03 23:27
MemberRoger Alsing3-Feb-03 23:27 
GeneralRe: LayeredWindows Pin
Marc Schneider4-Feb-03 0:38
MemberMarc Schneider4-Feb-03 0:38 
GeneralRe: LayeredWindows Pin
lsauer7-Sep-03 7:02
Memberlsauer7-Sep-03 7:02 
Nah its not worth it, as the suggested way is by far the faster one, and more future proof (users will profit from future improvement in the MS algorithms).
By now u can presuppose that an NT 5 system comes to play.
As far as the transparency goes, it actually gets sometimes messed up in the internal GDI+ for untraceable (as i'm not digging into it, neither have i searched for answers or solutions) reasons, which goes away after a reboot (means GDI+ is reinitiated).

But i'm sure ur article is very helpful for other purposes!
GeneralRe: LayeredWindows Pin
The_Mega_ZZTer3-Oct-05 3:19
MemberThe_Mega_ZZTer3-Oct-05 3:19 
GeneralThat was Fun! Pin
Rocky Moore2-Feb-03 1:38
MemberRocky Moore2-Feb-03 1:38 
GeneralRe: That was Fun! Pin
Marc Schneider4-Feb-03 0:40
MemberMarc Schneider4-Feb-03 0:40 
QuestionDo you know how to control Gif Animation in Label Class ? Pin
Chris Richner1-Feb-03 9:25
MemberChris Richner1-Feb-03 9:25 
AnswerRe: Do you know how to control Gif Animation in Label Class ? Pin
Marc Schneider1-Feb-03 10:32
MemberMarc Schneider1-Feb-03 10:32 
GeneralRe: Do you know how to control Gif Animation in Label Class ? Pin
Chris Richner1-Feb-03 10:42
MemberChris Richner1-Feb-03 10:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.