|
-
March 24th, 1999, 08:17 AM
#1
button slide
hi
i had desighned a form with a single command button my objective is that
the button ..at run time the mouse pointer focus should not be able to reach the button
ie.. if i place mouse pointer on the button.. button should slide of randomly all over the form so that i should not be able to click that button at all
can some one help me over this problem
regards
Nike
-
March 24th, 1999, 08:59 AM
#2
Re: button slide
Hi
This could get very annoying, but it's quite fun ...
Try something like :
Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim lLeft As Long
Dim lTop As Long
lLeft = Rnd(1) * (ScaleWidth - Command1.Width)
lTop = Rnd(1) * (ScaleHeight - Command1.Height)
Command1.Move lLeft, lTop
End Sub
Regards
Chris Eastwood
Codeguru - the website for developers
http://www.codeguru.com/vb
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|