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


Top 5 Contributors of the Month
david stephan

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)
        Else
            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:

Responses

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