|
|
||||||
|
#1
|
|
|
|
|
I need to get a form and all its controls to be visually redrawn before the next line of code begins execution. Which should I call before that particulare line of code executes, .Update or .Refresh?
|
|
|
|
#2
|
|
|
|
|
Update forces a control to receive a WM_PAINT message for the currently
invalidated area. Refresh does a full invalidation of the control followed an update. Whether this helps or not I can't say - essentially you'll have to iterate all the controls on the form and call their update method but if the control's handle has not been created, this won't help. "michael" <michael> wrote in message news:de6b > I need to get a form and all its controls to be visually redrawn before the next line of code begins execution. Which should I call before that particulare line of code executes, .Update or .Refresh? |
|
#3
|
|
|
|
|
Hi Michael,
I agree with the answer from Andrew. In addition, Refresh() calls Invalidate(1) to force the control to invalidate its client area and then call Update() to redraw itself and child controls immediately. Update() updates the client area by sending a WM_PAINT message, if the update region is not empty. This method sends a WM_PAINT message directly, bypassing the application queue. If the update region is empty, WM_PAINT is not sent. Best regards, Rhett Gong [MSFT] Microsoft Online Partner Support This posting is provided "AS IS" with no warranties, and confers no rights. Please reply to newsgroups only. Thanks. |
|
#4
|
|
|
|
|
Thanks. I'll give the .Refresh a try. I'm looking for immediate repainting for when a dialog closes to avoid the odd rectangle on the underlying form
Michael |
|
|
| Similar Threads | |
| Is there a difference between [F5/View->Refresh] & using the icon Team, I'm a s/w engineer working for a MNC. Recently i faced few issues on the Refresh icon in IE 7.0. Would like to know if there are any difference in functioning... |
|
| What's the difference between SP1 RC Refresh 2 and the full SP1? Can anyone please list the most significant differences between SP1 RC Refresh 2 and the soon to be released full SP1? From what I have read, I cannot tell if there is... |
|
| Difference between refresh and Upgrade Hi all, I am stuggling with the difference between Computer Upgrade and Computer Refresh. The only difference I can gather from documentation is that for Computer Refresh... |
|
| Difference between Refresh and Record Save.... I would like to know what the difference is between Refresh and Save Record. When should I use each? How each works with Unsaved Records? If I click on each which one(s)... |
|
| difference between append en refresh with tabledef In this newsgroup I learned how to refresh my linked tables through code But I also now that you can delete and append tables through code Can someone tell what the... |
|
|
All times are GMT. The time now is 09:47 PM. | Privacy Policy
|