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

Top 5 Contributors of the Month

Home >> Code Snippets >> Visual Studio >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

ClickMe Game

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

Please Please Click the Button

Public Class ClickMe
    Dim x As Integer
    Dim y As Integer
    Dim h, w As Integer

    Private Sub Button1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseEnter

        x = Button1.Location.X
        y = Button1.Location.Y
        w = Button1.Width
        h = Button1.Height
        If (x > 700 Or y > 700) Then

            Button1.SetBounds(x - 500, y - 500, w, h)
            Button1.SetBounds(x + 40, y + 40, w, h)
        End If

        Label1.Text = x.ToString & "    " & y.ToString
    End Sub

End Class
You put the One Button and one label for display the location of the button.
 please Click the Button


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

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