How do I move a label in VB6 when it shares a sub with another label?

jazjef
jazjef used Ask the Experts™
on
For example, I have two labels called Label(0) and Label(1) that are indexed as a control array. I want to use the MouseMove sub to move Label(0), but it also causes Label(1) to move because of their relationship in sharing the MouseMove sub. The two items must be in an array because of other code that operates upon them... anyone know how to deal with this? Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
And if you remove the control array?
Older than dirt
Most Valuable Expert 2017
Distinguished Expert 2018
Commented:
Private Sub Label1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Index = 0 Then
    'move Label(0)
End If

End Sub

Open in new window

Author

Commented:
Thanks a lot Martin Liss .....
Martin LissOlder than dirt
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
You're welcome and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2015, Experts-Exchange Top Expert Visual Basic Classic 2012 to 2014

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial