Hack Forums
[.NET] [VB.NET]Shaking Form[TUT] - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] [VB.NET]Shaking Form[TUT] (/showthread.php?tid=236447)

Pages: Pages 1 2


* - FizZ - Aug 10, 2010

This is a pretty fun little Shake thing you got there. I made it into C# and modded it a little bit.

Here is what I made:
Code
Random n = new Random();
    int a = n.Next(0, 50);
    int b = n.Next(0, 50);
    for (int i = 0; i < 100; i++)
    {
    a = n.Next(0, 50);
    b = n.Next(0, 50);
    this.Location = new Point(this.Location.X + a, this.Location.Y + b);
    System.Threading.Thread.Sleep(50);
    this.Location = new Point(this.Location.X - a, this.Location.Y - b);
    System.Threading.Thread.Sleep(50);
    }

Shakes in pretty much all directions ;)


* - 3xp0r73m - Aug 17, 2010

Thank you verry much ^^

TOO SHORT DAMNIT!


* - Diabolic - Aug 17, 2010

Nice.. Its all looking good I see!


* - avivagoeng - Oct 22, 2010

good source code,nice tutorial guys😉

[IMG]http://i305.photobucket.com/albums/nn217/mage619/GFX/Punk.jpg[/IMG]



* - Fabric - Oct 22, 2010

thanks for the share im goin to try it out


* - DrDrill - Oct 22, 2010

Nice ! Works fine for me ! Thank you :)


* - KINGz - Oct 26, 2010

great dude thanks ill use this in my other forum


* - Devilzhangout - Oct 26, 2010

thanks for this i will try this


* - Must - Jan 8, 2011

Thanks!! It's working great for me!


* - GodWall - Jan 8, 2011

Thanks, I tried it, works great :)


* - TheBlackMarket - Jan 8, 2011

Very nice Tut, thanks mate.


* - S!rk0 - Jan 8, 2011

If you want to have like WLM Wizz edit your code :

Code
Me.Location = New Point(Me.Location.X + 20, Me.Location.Y)
by
Code
Me.Location = New Point(Me.Location.X + 5, Me.Location.Y + 8)

and

Code
Me.Location = New Point(Me.Location.X - 20, Me.Location.Y)
by
Code
Me.Location = New Point(Me.Location.X - 5, Me.Location.Y - 8)

and thank's for you tut :p


* - Yosaki - Sep 3, 2011

WOW
What a great Idea
I think it will work and i gona try it now



* - Perplexity - Sep 3, 2011

(Sep 3, 2011 09:02 AM)Yosaki Wrote:  WOW
What a great Idea
I think it will work and i gona try it now

Mate, stop posting shit to get your post count up.
And stop gravedigging.