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

Top 5 Contributors of the Month
Sharon Maxwell

Post New Resource Bookmark and Share   


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


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
        End If

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

            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:


    No response found. Be the first to respond this post

    Post Comment

    You must Sign In To post reply

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