Quote:
> I have inherited an Access 2000 application that has many [~15] subforms
on
> a main form. These forms have a label whose caption is updated with the
> current display value. The sub forms also have a Line which is moved to
> display the value graphically, like an analog gauge. These sub forms have
an
> Image control containing a bitmap of the gauge
> The problem is if the update is done more quickly than ~250ms, the labels
> and the lines flicker, showing the underlying screen color, even through
the
> Image control. It makes little difference if only the changes are written
to
> the 'controls'
> I tried some OCX controls, but the 'pointer' is drawn and the 'dial' is
not
> until the form is refreshed by choosing another application and then
coming
> back to Access. The same controls, using the same update code show no
> problems in VB6. No response yet from control vendors.
> I tried using an image control and moving a new image to the image control
> on the subforms, but moving the .PictureData is abysmally slow. Changing
the
> .PictureData minimum change is about 100ms, judged by the update of the
> forms on the screen. I tested changing the .Picture property and can
change
> the .Picture very rapidly, perhaps less than 5ms. I expected the
> .PictureData to be much faster.
The problem here is that the Label, Line and Image controls (Among others)
are what's known as 'Windowless' controls (Well, technically everything is
in Access, but that's another story..) and as such they don't exist at
runtime - They're drawn over the background when it updates which sounds
fine but first the background is drawn, then each of the subsequent controls
are drawn on top if that directly to screen. This leads to the undesired
flickering since the screen is updating faster than the drawing is and you
see the in-between stages, you will get the same problems in VB too although
not quite so badly.
Unfortunately in Access you get very little access (No pun intended ;) to
what's actually going on behind the scenes visually as most of it's hidden
from you. What I've done in the past for our Access developers it to write
these visual components in VB where you get full control over the drawing,
then compile it to an ActiveX OCX which can be embedded on an Access form.
Hope this helps,
Mike
-- EDais --
- Microsoft Visual Basic MVP -
WWW: Http://EDais.earlsoft.co.uk/