subclassing a form to control flashing

S

scott w t

re access 2007

i have a form A that has been made the parent of form B through the win api
function SetParent (don't ask) ; here is roughly what they look like together:

AAAAAAAAAAAAAAAAAAAAAAAA
AABBBBBBBBBBAAAAAAAAAAAAA
AABBBBBBBBBBAAAAAAAAAAAAA
AABBBBBBBBBBAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAA

when the right edge of A is resized, B is not resized or moved and no
portion of B is hidden/covered by the borders of A, but there is a lot of
flashing in the controls of B, which i want to eliminate ; i've subclassed A
and have tried intercepting and "dumping" the WM_ERASEBKGND message, but that
doesn't fix the flashing ; i've tried intercepting A's WM_PAINT and
WM_NCPAINT messages and, before passing them on to A's native winproc,
validating that portion of A that is occupied by B (win api function
ValidateRect), but that didn't fix the flashing ; i've tried combining
dumping the WM_ERASEBKGND message and validating the area occupied by B, but
that didn't fix the flashing ; i've tried subclassing B and dumping its
WM_ERASEBKGND, WM_PAINT and WM_NCPAINT messages, but that didn't fix the
flashing ; and i've tried doing all of this together, but that didn't fix the
flashing

there's gotta be a way to do this, doesn't there !? can anyone help ?
 
D

Douglas J. Steele

Sorry, but I have to ask! What are you hoping to achieve through the use of
the API function?

Forms in Access aren't the same as forms in other languages: it's possible
that that's cause of your problems.
 
S

scott w t

i want to change the width of form A without repainting form B, which is
what causes the unnecessary flickering ; any ideas ?
 
S

Stuart McCall

scott w t said:
i want to change the width of form A without repainting form B, which is
what causes the unnecessary flickering ; any ideas ?

Try using:

Application.Echo False

then do the resize, followed by:

Application.Echo True
 

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