Jump to content



Photo

WindowDarken


  • Please log in to reply
3 replies to this topic

#1 crashdemons

crashdemons

    What Avatar?

  • Active Members
  • PipPipPipPipPipPip
  • 495 posts

Posted 06 January 2011 - 07:45 AM

Subtitle pretty much says it.
This program darkens the screen except for the active window with options accessible through a convenient tray icon.

Other options are supported as well, including:
  • active window-change fading control
  • custom darkening color (instead of default black)
  • background image choice (faded image over background windows. weird, but ok.)
  • etc...
Obligatory Screenshot:
Posted Image

Download:
Attached File  WindowDarken.zip   13.21K   331 downloads (source)

Off-topic notes:
I have no clue if there are other programs that do something similar, nor did I really check. I didn't really check the forum thoroughly either to see if something like this already existed, sorry.
This was written initially for Windows XP, so I'm sorry if I wasted your time if something like this exists in your Windows Vista or 7.

Tech summary:
Forces the active Window as Topmost and a solid "darken" window on top of the normal windosw.
Has complications concerning topmost state changes of both windows and other topmost windows.
Doesn't seem to get along with some windows (namely GIMP's editor window).
Some exclusions are coded in, but there may need to be an option added later to allow custom exclusions.
Au3.3.6.1 tested
WinXP SP3 tested

You may now critique my horrible code. *fires starting pistol* :x

Edit 5-5-2013: Images were not visible

Edited by crashdemons, 06 May 2013 - 12:56 AM.

Posted ImageMy Projects -WindowDarkenPosted Image (Darken except the active window)Yahsmosis Chat Client (Discontinued)StarShooter GamePosted Image (Red alert! All hands to battlestations!)YMSG Protocol Support (Discontinued)Circular Keyboard and OSK example. (aka Iris KB)Target ScreensaverDrive Toolbar ThingyRollup ProPosted Image (Minimize-to-Titlebar & More!)2D Launcher physics exampleAscii ScreenshotAutoIt3 Quine Example ("Is a Quine" is a Quine.)USB Lock (Another system keydrive - with a toast.)







#2 UEZ

UEZ

    Never say never

  • MVPs
  • 3,616 posts

Posted 06 January 2011 - 10:20 AM

Nice idea and implementation! I like it and it seems to work properly also on Windows Server 2008.

Can you implement to activate the window under the mouse after x ms?

Br,
UEZ

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#3 Mat

Mat

    43 38 48 31 30 4E 34 4F 32

  • MVPs
  • 4,042 posts

Posted 06 January 2011 - 10:57 AM

I have a funny feeling that this is in the win api already... I just can't think of the right search query.

Maybe this page.

I don't know where I'm going, but I'm on my way.


#4 crashdemons

crashdemons

    What Avatar?

  • Active Members
  • PipPipPipPipPipPip
  • 495 posts

Posted 06 January 2011 - 11:06 AM

Nice idea and implementation! I like it and it seems to work properly also on Windows Server 2008.

Can you implement to activate the window under the mouse after x ms?

Br,
UEZ

I'm not sure what API calls would make this happen, but in Windows XP this behavior can be enabled through Microsoft's Tweak UI program.
( Mouse -> X-Mouse )

Could just be a registry setting, but I'm not sure what it does to make it take effect immediately.

I have no idea about Server 2008 support for this feature though...
- - - - -

If this can be solved with a system setting, I will probably consider it beyond the scope of this project.

_WinAPI_SystemParameterInfo() with SPI_SETACTIVEWINDOWTRACKING perhaps?

Edited by crashdemons, 06 January 2011 - 11:33 AM.

Posted ImageMy Projects -WindowDarkenPosted Image (Darken except the active window)Yahsmosis Chat Client (Discontinued)StarShooter GamePosted Image (Red alert! All hands to battlestations!)YMSG Protocol Support (Discontinued)Circular Keyboard and OSK example. (aka Iris KB)Target ScreensaverDrive Toolbar ThingyRollup ProPosted Image (Minimize-to-Titlebar & More!)2D Launcher physics exampleAscii ScreenshotAutoIt3 Quine Example ("Is a Quine" is a Quine.)USB Lock (Another system keydrive - with a toast.)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users