Prev: App w UC distro
Next: Thanks Re: Send an email
From: hermann leinen on 19 Feb 2010 02:48 That is really great! Thank you very much. I didn't see this page at the first time and not at the second time I visited this site! Thanks!! Am 18.02.2010 14:23, schrieb MarkJ: > The trouble with LockWindowUpdate is that it is system-wide: only one > window in the system can be locked at a time. If two applications are > using LockWindowUpdate at the same time, one can fail. It's mainly > used for drag-and-drop, so you might find drag-and-drop stops working > in other programs while your VB6 application is repainting itself. > > That's why WM_REDRAW is preferred - it's specific to one window so the > potential for glitches is removed. > > http://blogs.msdn.com/oldnewthing/archive/2007/02/22/1742084.aspx
From: hermann leinen on 19 Feb 2010 03:30 I am not sure what I'm doing wrong, but WM_REDRAW to false does not really take all cotrols into account. Some controls are still visibly redrawing... But the flickering is reduced, so I can savely say that something IS working. Am 18.02.2010 14:23, schrieb MarkJ: > The trouble with LockWindowUpdate is that it is system-wide: only one > window in the system can be locked at a time. If two applications are > using LockWindowUpdate at the same time, one can fail. It's mainly > used for drag-and-drop, so you might find drag-and-drop stops working > in other programs while your VB6 application is repainting itself. > > That's why WM_REDRAW is preferred - it's specific to one window so the > potential for glitches is removed. > > http://blogs.msdn.com/oldnewthing/archive/2007/02/22/1742084.aspx
From: Helmut Meukel on 19 Feb 2010 04:03 Hmmm, your app has more than one window, most controls are windows. AFAIK, WM_REDRAW (aka WM_SETREDRAW) will lock only one Window. http://www.aboutvb.de/khw/artikel/khwlockedwindows.htm It's in german, but this shouldn't a problem for you <g> Helmut. "hermann leinen" <h.leinen(a)gmx.de> schrieb im Newsbeitrag news:eswv23TsKHA.3408(a)TK2MSFTNGP06.phx.gbl... >I am not sure what I'm doing wrong, but WM_REDRAW to false does not really take >all cotrols into account. Some controls are still visibly redrawing... > But the flickering is reduced, so I can savely say that something IS working. > > Am 18.02.2010 14:23, schrieb MarkJ: >> The trouble with LockWindowUpdate is that it is system-wide: only one >> window in the system can be locked at a time. If two applications are >> using LockWindowUpdate at the same time, one can fail. It's mainly >> used for drag-and-drop, so you might find drag-and-drop stops working >> in other programs while your VB6 application is repainting itself. >> >> That's why WM_REDRAW is preferred - it's specific to one window so the >> potential for glitches is removed. >> >> http://blogs.msdn.com/oldnewthing/archive/2007/02/22/1742084.aspx >
From: MarkJ on 19 Feb 2010 07:29 Helmut's suggestion looks excellent. The module looks very useful. You could even use it by looping through all the controls in your main form, and locking any that have a hWnd property.
From: Robert on 21 Feb 2010 23:17
On Fri, 19 Feb 2010 04:29:41 -0800 (PST), MarkJ <mark.tunnard.jackson(a)googlemail.com> wrote: >Helmut's suggestion looks excellent. The module looks very useful. You >could even use it by looping through all the controls in your main >form, and locking any that have a hWnd property. Could BeginDeferWindowPos / DeferWindowPos / EndDeferWindowPos help in this kind of scenario? According to the docs "The EndDeferWindowPos function simultaneously updates the position and size of one or more windows in a single screen-refreshing cycle." Just a thought. |