By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,477 Members | 1,641 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,477 IT Pros & Developers. It's quick & easy.

Mouse move event question.

P: 8
I know the control tip text will display information about a text box. However I was wondering if there is a way to change it based on the value of the text box. Is it possible to create a mouse move event that will do the same thing?

i.e. value of txtStatus

If [txtStatus] = A then "good"
If [txtStatus] = B then "bad"

something to that effect. I don't really know if it is possible or how to code it. Any help would be greatly appreciated.

Thanks,
Patrick
Jun 9 '08 #1
Share this Question
Share on Google+
3 Replies


missinglinq
Expert 2.5K+
P: 3,532
If I understand your question, this should do the job:

Expand|Select|Wrap|Line Numbers
  1. Private Sub txtStatus_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2.  If Me.txtStatus = "a" Then txtStatus.ControlTipText = "Good"
  3.  If Me.txtStatus = "b" Then txtStatus.ControlTipText = "Bad"
  4.  If Me.txtStatus <> "a" And Me.txtStatus <> "b" Then txtStatus.ControlTipText = ""
  5. End Sub
Welcome to Bytes!

Linq ;0)>
Jun 9 '08 #2

P: 8
Thanks, worked like a charm.
Jun 9 '08 #3

missinglinq
Expert 2.5K+
P: 3,532
Glad we could help!

Linq ;0)>
Jun 9 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.