aziz rasul
Active member
- Local time
- Today, 14:35
- Joined
- Jun 26, 2000
- Messages
- 1,935
I have a textbox on a form. The form also contains two subforms (call them subform1 and subform2) superimposed over each other. subform1 is the subform that is normally visible.
On the MouseMove event, when I hover the mouse cursor over the textbox, I want sunform1 to become invisible and subform2 to become visible depending on the value of the textbox. This is the code I have which works.
The problem that I have is that subform2 flickers when the mouse cursor is over the textbox. I know that it's because it carries out the MouseMove event over and over again, but how can I amend the code to get rid of this flicker?
On the MouseMove event, when I hover the mouse cursor over the textbox, I want sunform1 to become invisible and subform2 to become visible depending on the value of the textbox. This is the code I have which works.
Code:
Private Sub txtReferralID_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If Me.txtreferralid > 0 Then
Me.subform2.Visible = True
Me.subform1.Visible = False
Me.subform2.Requery
Else
Me.subform2.Visible = False
Me.subform1.Visible = True
End If
End Sub
The problem that I have is that subform2 flickers when the mouse cursor is over the textbox. I know that it's because it carries out the MouseMove event over and over again, but how can I amend the code to get rid of this flicker?