DonationCoder.com Software > Coding Snacks
IDEA: Windows Desktop Refresh Message Eater
(1/1)
Ralf Maximus:
Here's my issue...
I have an ill-behaved application that I am forced to use, and one of its annoying bugs is that whenever it loads data into its grid, it fires a refresh message at the Windows desktop for EVERY ROW. So, if I wish to view 1000 records, the Windows desktop goes nuts with refreshing -- icons flicker, child windows redraw. 1000 times in a row.
Needless to say, performance is in the toilet during this time, and I am almost having siezures from my strobing desktop.
Would it be feasible to have a tiny tray applet that, when turned ON, intercepts and disposes of all refresh messages sent to the Windows desktop? Obviously, if left activated severe cosmetic issues would result... but I anticipate using this hootchie briefly, like only during times when I know my app's grid is going to load records. So I'd double-click the thingie to disable Windows desktop refresh, then double-click it again to re-enable it.
Any ideas?
skrommel:
:) Try Freeze!
Press F1 to freeze/unfreeze the active window (stop it redrawing).
Skrommel
--- ---;Freeze.ahk
; Press F1 to freeze/unfreeze the active window (stop it redrawing)
;Skrommel @ 2008
#SingleInstance,Force
OnExit,EXIT
DetectHiddenWindows, on
F1::
If locked<>1
Gosub,LOCK
Else
Gosub,UNLOCK
Return
LOCK:
winid:=WinExist("A")
SendMessage,0xB,0,0,,ahk_id %winid%
locked=1
Return
UNLOCK:
SendMessage,0xB,1,0,,ahk_id %winid%
locked=0
DllCall("RedrawWindow",UInt,0,UInt,0,UInt,0,UInt,0x101)
Return
EXIT:
Gosub,UNLOCK
ExitApp
Ralf Maximus:
OOooh, cool! Thanks, skrommel.
I'll try it and see... but the underlying issue is that the active window is firing refresh event messages at Windows handle=0 (the desktop). Would freezing the parent window stop it from broadcasting refresh messages?
skrommel:
:tellme: Try replacing
--- ---LOCK:
winid:=WinExist("A")
with
--- ---LOCK:
winid:=DllCall("GetDesktopWindow")
Skrommel
Navigation
[0] Message Index
Go to full version