![]() ![]() In order to draw a perfect circle, you have to know the following trigonometry concept: the cosines of an angle in degrees give us the X and the sine gives us the Y. So, let's review some simple math notions. We use the function DrawLine of GDI+, which needs two points, the beginning and the end of the line. How to draw a spoke?įirst of all, we need coordinates for each spoke. The default rotation speed is 80, so at every 80 milliseconds, the circle will be redrawn. Higher the value is, slower will be the rotation. When you use the property RotationSpeed, you modify the timer's property named Interval. The LoadingCircle uses a timer, and it has two responsibilities: to determine the color of the next spoke, and to redraw the circle at a specified number of milliseconds. So, why don't we use this concept to show to our users that our application is working and/or loading? Let's begin by the presentation of the component I developed. Moreover, Microsoft also uses this kind of animation in the Windows Media Center, Encarta 2006, SQL Server Management Studio Express, etc. However, animations are getting more and more popular.įor example, when Firefox loads a page, a small spinning circle appears and shows you that the page is loading. It is everywhere in Windows and many other applications. ![]() When it's time to wait, we are used to seeing the classic blue progress bar. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |