| View previous topic :: View next topic |
| Author |
Message |
Blackfyer Master Cheater
Reputation: 0
Joined: 24 Mar 2006 Posts: 380
|
Posted: Mon Jan 07, 2008 9:03 pm Post subject: Moving an item |
|
|
Hey, i didn't see anyone ask this so i thought i would.
Im trying to make a little vb6 thing that involves you chasing a button that runs away from your mouse (like one of those idiot test thing) just to figure it out. I have the form and the labels and the button and everything, and i have one of the sides moving properly by luck.
Does anyone know what the code would be if i wanted Picture1 to move right if the mouse moves over label2? (I know the mousemove thing and it works fine, i just need the code so that it moves to the right.)
When i tried a few times the Picture1 just disappeared or move to a random spot on the form.
Any ideas? thanks
_________________
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8585 Location: 127.0.0.1
|
Posted: Mon Jan 07, 2008 9:35 pm Post subject: |
|
|
| Code: | Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Left = Picture1.Left + 2
End Sub |
Something like that?
_________________
- Retired. |
|
| Back to top |
|
 |
Blackfyer Master Cheater
Reputation: 0
Joined: 24 Mar 2006 Posts: 380
|
Posted: Mon Jan 07, 2008 9:40 pm Post subject: |
|
|
oh wow! thanks man works great , was worrying someone wouldn't respond. It's not a big deal some might say but im gonna +rep you anyway ^_^ (rhymes)
_________________
|
|
| Back to top |
|
 |
|