Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Jiggle.cs
- Created by Adonis S. Deliannis ( Blizzardo1 )
- Created on January 13, 2011
- Uploaded to Youtube on January 14, 2011
- This is a Jiggle Tutorial that will Jiggle your Window upon event.
- Copyright (c) 2011 Adonis S. Deliannis, All rights reserved. (Update of 2012 due to reshare)
- */
- void Jiggle()
- {
- int X = this.Location.X; // Set the X Integer
- int Y = this.Location.Y; // Set the Y Integer
- Random r = new Random(); // Create the Random Set that will Move our Window
- int JiggleCount = 0; // Set our Count to 0
- int Z = 25; // Set our Range to 25
- while (JiggleCount < 1000)
- {
- // Set our new Location of out Window
- this.Location = new Point(r.Next(X - Z, X + Z), r.Next(Y - Z, Y + Z));
- JiggleCount++; // Increment our Count
- }
- JiggleCount = 0; // Reset Count to 0
- this.Location = new Point(X, Y); // Put our Window back where it was
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement