Weird flickering on tabbed control

G

Guest

I have a tabbed control with a number of command buttons on one tab.
When I move the cursor back and forth on the empty area of the tab, the
buttons flicker in a strange way. Is there any way to stop this? I do have a
mousemove event for the blank area of the tab; this makes all the button
fonts normal. When the cursor passes over the buttons a mousemove event makes
the button font bold. Is this what is causing it?
 
A

Allen Browne

Probably, yes.

Change your code so that it test whether things are already set correctly,
and only makes the change when necessary. If you are not constantly changing
the property, the flickering should stop.

If that doesn't solve the problem, it could be this issue:
Flicker with tab controls
at:
http://allenbrowne.com/ser-46.html

But from your description, my money is on your code causing constant
changes.
 
G

Guest

Thanks for the response.
That did solve the flicker.
However, it left another problem.
Now when the cursor moves off a button onto the background the caption font
stays bold. So I always end up with the last moved over button with a bold
ca-ption. With my old technique this did not happen. Any idea why the
mousemove event for the background is not working? Here is the code
'-------------------------------------------------------------------------------------------
Private Sub butActivityTypeAndSubType_MouseMove(Button As Integer, Shift As
Integer, x As Single, Y As Single)
If Me.butActivityTypeAndSubType.FontBold = False Then
Me.butActivityTypeAndSubType.FontBold = True
Me.butSQAComp.FontBold = False
End If
End Su
'------------------------------------------------------------------------------------------
Private Sub butSQAComp_MouseMove(Button As Integer, Shift As Integer, x As
Single, Y As Single)
If Me.butSQAComp.FontBold = False Then
Me.butSQAComp.FontBold = True
Me.butActivityTypeAndSubType.FontBold = False
End If
End Su
'------------------------------------------------------------------------------------------
Private Sub tabReports_MouseMove(Button As Integer, Shift As Integer, x As
Single, Y As Single)
' This is not working !!!
' It does not Unbold the button captions, Why ???
If Me.butActivityTypeAndSubType.FontBold = True Then
Me.butActivityTypeAndSubType.FontBold = False
End If
If Me.butSQAComp.FontBold = True Then
Me.butSQAComp.FontBold = False
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top