.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Post New Resource Bookmark and Share   

ButtonMovement

Posted By:Abraham       Posted Date: August 29, 2010    Points: 10    Category:    URL: http://www.dotnetspark.com  

ButtonMove
 

button move
Public Class Form4

     'it is fun dont take serious
    Dim x As Integer
    Dim y As Integer
    Dim h, w, cnt As Integer
    Dim c As Integer = 1

    Private Sub Button1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseEnter
        ' it is fun dont take serious
        x = Button1.Location.X
        y = Button1.Location.Y
        w = Button1.Width
        h = Button1.Height
        
        If cnt > 25 Then

            MsgBox("Better luck next time")
            cnt = 0
            Me.Close()
        End If

        If (x > 700 Or y > 700) Then
            cnt = cnt + 1
            Button1.SetBounds(x - 600, y - 500, w, h)

        Else
            Button1.SetBounds(x + 40, y + 40, w, h)
            cnt = cnt + 1
        End If

    End Sub


    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        MsgBox("Nothing to worry, go to Shop buy the Brain of Goat then eat ")
    End Sub

    Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Label1.Text="Are You Genious"
    End Sub
End Class

     

Further Readings:

    Responses

    No response found. Be the first to respond this post

    Post Comment

    You must Sign In To post reply
    Here

    Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend