Form Flicker

C

Chad

Hello, I made a custom switchboard and I have alot of flicker in my controls
and cant figure out why. I had posted in the UA forms with little luck and
searched the net with no luck. Please help as im learning and cant figure out
whats causing this. Please take a look at this example I had posted in UA...
Thanks!
Cat=&Board=83&Number=1596393&Zf=&Zw=&Zg=0&Zl=a&Main=1596393&Search=true&where=&Zu=122626&Zd=l&Zn=&Zt=44&Zs=&Zy=#Post1596393&Zp=

Here is the code im using in the form for one of my buttons but I have
several in the form.

Private Sub mOverFont(lbl As String)
Me(lbl).FontSize = 10 'Change number to size of font when moused over
End Sub

Private Sub mOutFont(lbl As String)
Me(lbl).FontSize = 9 'Change number to size of font if NOT moused over
End Sub

Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Label80.ForeColor = 8388608 'Sets the text color back to Blue
mOutFont ("Label80") 'Sets the text size back to font 8

Private Sub cmdMainDB_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Label80.ForeColor = 32768 'Sets the text color to Green
mOverFont ("Label80") 'Sets the text size to font 12
 
J

John Spencer

Access is not really very good at using mouse over events to do things.
It tends to cause flicker as things are continuously being processed.

One thing that might help would be to test the value of fontsize and
only change that when it needs to be changed. Use an If statement to
check if the size is already what you want it to be.

For example:

Private Sub mOverFont(lbl As String)
If me(lbl).Fontsize <> 10 Then
Me(lbl).FontSize = 10 'Change Font size when moused over
End If
End Sub

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
C

Chad

Thanks for the fast responce John! I found a sample on the net and
incorperated it into mine and it works great, It uses a module! any way I
uploaded the fixed Switchboard to the same link as specified in my previous
post so others can benifit....... Thanks!
 

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