|
-
Sep 20th, 2001, 12:15 AM
#4
Thread Starter
Hyperactive Member
Re: here's an example
Originally posted by mstuehler
I'm not sure if this is what you're looking for, but this function will randomly relocate a command button somewhere on a form:
Private Sub moveButton(cntlButton As Control)
Dim newX As Long
Dim newY As Long
Randomize
newX = Int((Me.Width - cntlButton.Width - 150) * Rnd + 15)
newY = Int((Me.Height - cntlButton.Height - 420) * Rnd + 15)
cntlButton.Move newX, newY
End Sub
Private Sub Command1_Click()
Call moveButton(Command1)
End Sub
can you *edited*clean*edited* that up alittle and tell me what that all do??
btw...I want it to keep going to random spots non stop
Last edited by scsa20; Sep 20th, 2001 at 12:19 AM.
p|-|34|2 /\/\3 f0|2 | $p34k 1337 
My TSS quote of the day: "If your haveing a bad day, just press the restart button."
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
|