Greyowlsl
Mlak Mlak
- Local time
- Today, 23:30
- Joined
- Oct 4, 2006
- Messages
- 204
Hi,
I have a number of buttons and they each have a mousemove cmd so when i move my mouse over the button the text goes blue and when i take it off it goes black again. I was wondering if there is a better way to code it. Below is the code for the page: (this is only a small section, the whole code it 13000+ characters so i couldent paste it all on here
)
Thanks,
Leon
I have a number of buttons and they each have a mousemove cmd so when i move my mouse over the button the text goes blue and when i take it off it goes black again. I was wondering if there is a better way to code it. Below is the code for the page: (this is only a small section, the whole code it 13000+ characters so i couldent paste it all on here
Code:
Private Sub cmd1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.cmd6.ForeColor = vbBlack
Me.cmd1.ForeColor = vbBlue
Me.cmd2.ForeColor = vbBlack
Me.cmd3.ForeColor = vbBlack
Me.cmd4.ForeColor = vbBlack
Me.cmd5.ForeColor = vbBlack
Me.cmd7.ForeColor = vbBlack
Me.cmd8.ForeColor = vbBlack
Me.cmd9.ForeColor = vbBlack
Me.cmd10.ForeColor = vbBlack
Me.cmd11.ForeColor = vbBlack
End Sub
Private Sub Box31_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.cmd16.SetFocus
Me.cmd1.ForeColor = vbBlack
Me.cmd2.ForeColor = vbBlack
Me.cmd3.ForeColor = vbBlack
Me.cmd4.ForeColor = vbBlack
Me.cmd5.ForeColor = vbBlack
Me.cmd6.ForeColor = vbBlack
Me.cmd7.ForeColor = vbBlack
Me.cmd8.ForeColor = vbBlack
Me.cmd9.ForeColor = vbBlack
Me.cmd10.ForeColor = vbBlack
Me.cmd11.ForeColor = vbBlack
Me.cmd16.SetFocus
End Sub
Private Sub Form_GotFocus()
Me.cmd16.SetFocus
End Sub
Private Sub Form_Open(Cancel As Integer)
Me.cmd16.SetFocus
End Sub
Thanks,
Leon