Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 06, 2016, 10:12:00 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Windows Desktop Refresh Message Eater  (Read 4267 times)

Ralf Maximus

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 927
    • View Profile
    • Read more about this member.
    • Donate to Member
IDEA: Windows Desktop Refresh Message Eater
« on: December 01, 2008, 04:16:43 PM »
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

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 886
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: Windows Desktop Refresh Message Eater
« Reply #1 on: December 03, 2008, 12:17:26 PM »
 :) 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
Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.

Ralf Maximus

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 927
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: Windows Desktop Refresh Message Eater
« Reply #2 on: December 03, 2008, 01:15:37 PM »
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

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 886
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: Windows Desktop Refresh Message Eater
« Reply #3 on: December 03, 2008, 03:19:02 PM »
 :tellme: Try replacing

LOCK:
winid:=WinExist("A")
with
LOCK:
winid:=DllCall("GetDesktopWindow")

Skrommel
Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.