Results 1 to 9 of 9
  1. #1
    /b/oss's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    13,651
    Reputation
    795
    Thanks
    3,547

    Post [Snippet]Screen Saver

    my second TUT this half hour enought for today, enjoy this TUT share resoults with us!



    This tutorial will show you how to make a bouncing ball program in Visual basic 2008 / 2010

    Add a picture box to the form:

    use a transparent picture for this tutorial,

    Add this picture to your picture box:

    Change also Size Mode to Zoom

    Add 4 timers to the form. Change their interval property to 1

    Change also the first timer Enabled property to True

    Let's add the code to each timer tick event:

    Timer1.Tick

    [PHP]Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

    PictureBox1.Location = New Point(PictureBox1.Location.X + 5, PictureBox1.Location.Y + 5)

    If PictureBox1.Location.X + PictureBox1.Width > Me.Width Then

    Timer1.Stop()

    Timer2.Start()

    End If[/PHP]



    [PHP] If PictureBox1.Location.Y + PictureBox1.Height > Me.Height Then

    Timer1.Stop()

    Timer3.Start()

    End If

    End Sub
    [/PHP]
    Timer2.Tick



    [PHP]Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick

    PictureBox1.Location = New Point(PictureBox1.Location.X - 5, PictureBox1.Location.Y + 5)

    If PictureBox1.Location.Y + PictureBox1.Height > Me.Height Then

    Timer2.Stop()

    Timer4.Start()

    End If

    If PictureBox1.Location.X < 0 Then

    Timer2.Stop()

    Timer1.Start()

    End If

    End Sub

    Timer3.Tick

    Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick

    PictureBox1.Location = New Point(PictureBox1.Location.X + 5, PictureBox1.Location.Y - 5)

    If PictureBox1.Location.X + PictureBox1.Width > Me.Width Then

    Timer3.Stop()

    Timer4.Start()

    End If

    If (PictureBox1.Location.Y < 0) Then

    Timer3.Stop()

    Timer1.Start()

    End If

    End Sub
    [/PHP]
    Timer4.Tick

    [PHP]Private Sub Timer4_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer4.Tick

    PictureBox1.Location = New Point(PictureBox1.Location.X - 5, PictureBox1.Location.Y - 5)

    If PictureBox1.Location.X < 0 Then

    Timer4.Stop()

    Timer3.Start()

    End If

    If (PictureBox1.Location.Y < 0) Then

    Timer4.Stop()

    Timer2.Start()

    End If

    End Sub[/PHP]


    Bouncing Ball screen saver, enjoy! m_t_h

  2. #2
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Will play with it in free time. And nice comparisons.
    Thnx for sharing.

  3. #3
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Add some pictures for the optic.



  4. #4
    /b/oss's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    13,651
    Reputation
    795
    Thanks
    3,547
    Quote Originally Posted by Blubb1337 View Post
    Add some pictures for the optic.
    i will try to but, why, my friend, want begginers do that?

  5. #5
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    It simply looks better xD



  6. #6
    /b/oss's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    13,651
    Reputation
    795
    Thanks
    3,547
    Quote Originally Posted by Blubb1337 View Post
    It simply looks better xD
    awww i will make my next TUTs with picks

  7. #7
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    PICTURESSSSSSSSSSSSSSSSSS



  8. #8
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    I agree, Tutorials are lengthy with pics, if you insist on just copying and pasting code into a new topic, I will have to become a little more forceful, keep simplistic mini-tutorials and small code in the snippets vault, if you feel like creating a lengthy tutorial, then feel free to create a whole topic on it


     


     


     



    The Most complete application MPGH will ever offer - 68%




  9. #9
    /b/oss's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    13,651
    Reputation
    795
    Thanks
    3,547
    Quote Originally Posted by NextGen1 View Post
    I agree, Tutorials are lengthy with pics, if you insist on just copying and pasting code into a new topic, I will have to become a little more forceful, keep simplistic mini-tutorials and small code in the snippets vault, if you feel like creating a lengthy tutorial, then feel free to create a whole topic on it
    well nextgen, all my new TUT's will be with pictures or with vids

  10. The Following User Says Thank You to /b/oss For This Useful Post:

    NextGen1 (05-17-2010)

Similar Threads

  1. Ipod Screen Savers
    By ikroniik in forum Showroom
    Replies: 27
    Last Post: 08-27-2011, 12:11 PM
  2. [TUT] Gray Screen saver on warrock
    By ktalin91 in forum WarRock Korea Hacks
    Replies: 0
    Last Post: 05-12-2007, 07:45 PM
  3. top of screen message hack
    By hjerherjdsd in forum WarRock - International Hacks
    Replies: 30
    Last Post: 07-31-2006, 06:39 PM
  4. Fucking huge screen
    By Dave84311 in forum General
    Replies: 11
    Last Post: 07-11-2006, 10:53 AM