Undesired Flickering of Controls When using mouse move event


G

Guest

Hi,
I have a dialog form with popup property set to "yes" as my startup form.
the form has number of controls. I customize their backgrouds and fonts with
mouse move even. The form works fine when MS Access window is open but when i
run it from a shortcut from desktop with shortcut property set to minimize
the displayed form shows alot of flickering of controls backgroungs even if
the mouse moves on detail section. the detail section has coding for original
backgrounds of controls on mouse move property. Can i remove this fault or i
have to run the form with MS Access window open.
 
Ad

Advertisements

A

Allen Browne

If you set the properties of the controls every time the mouse move event
fires, they will be constantly flickering. Instead, test if the property is
already set correctly, and change only when necessary, e.g.:

If Me.[SomeControl].BackColor <> vbRed Then
Me.[SomeControl].BackColor = vbRed
End If
 
G

Guest

It worked fine. thanks. can u tell me to change the color of current record
in continous form ( Current Record Attribute Property in Oracle )
--
I H Naqvi


Allen Browne said:
If you set the properties of the controls every time the mouse move event
fires, they will be constantly flickering. Instead, test if the property is
already set correctly, and change only when necessary, e.g.:

If Me.[SomeControl].BackColor <> vbRed Then
Me.[SomeControl].BackColor = vbRed
End If

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

I H Naqvi said:
Hi,
I have a dialog form with popup property set to "yes" as my startup
form.
the form has number of controls. I customize their backgrouds and fonts
with
mouse move even. The form works fine when MS Access window is open but
when i
run it from a shortcut from desktop with shortcut property set to minimize
the displayed form shows alot of flickering of controls backgroungs even
if
the mouse moves on detail section. the detail section has coding for
original
backgrounds of controls on mouse move property. Can i remove this fault or
i
have to run the form with MS Access window open.
 
Ad

Advertisements


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