|
|
Title | Make an annoying button game |
Keywords | game, button, move, annoying, dumb |
Categories | Puzzles and Games |
|
|
Put a button on a form. In the button's MouseMove event handler, move the button so it is no longer under the mouse.
|
|
Private Sub Command1_MouseMove(Button As Integer, Shift As _
Integer, X As Single, Y As Single)
' Try holding down the Space key and moving the
' mouse with and without the following code
' commented out.
'
' If (X < 0) Or (Y < 0) Or _
' (X > Command1.Width) Or _
' (Y > Command1.Height) Then _
' Exit Sub
Command1.Move _
Rnd * (ScaleWidth - Command1.Width), _
Rnd * (ScaleHeight - Command1.Height)
End Sub
|
|
Also try shrinking the form so the button barely fits and then move the mouse over it.
|
|
|
|
|
|