AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Translucency worked in XP but not in 2000?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Rhys



Joined: 17 Apr 2007
Posts: 761
Location: Florida

PostPosted: Wed Apr 25, 2007 12:43 pm    Post subject: Translucency worked in XP but not in 2000? Reply with quote

I pulled the meat of this code from the tranlucent OSD example, and just changed it a bit for my purposes:

Code:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

; Example: On-screen display (OSD) via transparent window:

CustomColor = EEAA99  ; Can be any RGB color (it will be made transparent below).
Gui +LastFound +AlwaysOnTop -Caption +ToolWindow  ; +ToolWindow avoids a taskbar button and an alt-tab menu item.
Gui, Color, %CustomColor%
Gui, Font, s32  ; Set a large font size (32-point).
Gui, Add, Text, vMyText cLime, SCRIPT RUNNING - ALT+Z TO ABORT  ; XX & YY serve to auto-size the window.
; Make all pixels of this color transparent and make the text itself translucent (150):
WinSet, TransColor, %CustomColor% 150
Gui, Show, xCenter y0 NoActivate  ; NoActivate avoids deactivating the currently active window.
return


When running this in Win 2000, it had a translucent (pink I think) background... In XP it has no background. Does transparency act different in XP and 2000?
_________________
[Join IRC!]
Back to top
View user's profile Send private message
svi



Joined: 09 Oct 2006
Posts: 236
Location: Finland

PostPosted: Wed Apr 25, 2007 4:04 pm    Post subject: Reply with quote

I had the same problem on my second instance of Windows XP.

After reading your post I spent about an hour to investigate what causes it.

The solution was simple: on my newer intallation of XP, colours were set to 16 bits, so the color RGB 0x99AAEE became 0x9CAAEF.

You have to use 32 bit (or 24 if available!?) colors or change CustomColor (the color that's made invisible on the example script) to match 16 bit colors eg. above mentioned 0x9CAAEF.
_________________
Pekka Vartto
Back to top
View user's profile Send private message
Rhys



Joined: 17 Apr 2007
Posts: 761
Location: Florida

PostPosted: Wed Apr 25, 2007 4:10 pm    Post subject: Reply with quote

svi wrote:
I had the same problem on my second instance of Windows XP.

After reading your post I spent about an hour to investigate what causes it.

The solution was simple: on my newer intallation of XP, colours were set to 16 bits, so the color RGB 0x99AAEE became 0x9CAAEF.

You have to use 32 bit (or 24 if available!?) colors or change CustomColor (the color that's made invisible on the example script) to match 16 bit colors eg. above mentioned 0x9CAAEF.


Great catch!

I appreciate you taking the time to look into this, as it would have taken me much longer than an hour (if ever!) to find it.
_________________
[Join IRC!]
Back to top
View user's profile Send private message
svi



Joined: 09 Oct 2006
Posts: 236
Location: Finland

PostPosted: Wed Apr 25, 2007 10:13 pm    Post subject: Reply with quote

No problem Cool

I tried to figure it out earlier, but thought that the TransColor has to be set after Gui, Show on certain circumstances, and tried to find out why, not primarly to solve it.
But this thread made me effort to fix the problem.

I think it should be mentioned in help file (Gui, OSD example) that Transcolor has to be the color that the video card produces, which may differ from the color defined by Gui, color, or use in the example some 16-bit color (means 5 bits for red, 6 for green and 5 for blue, but no idea how they are coded).

It's confusing that some image processing applications (at least ArcSoft PhotoStudio) show color values defined in the image file, while IrfanView and Window Spy show the value produced by the video card Confused
_________________
Pekka Vartto
Back to top
View user's profile Send private message
ProsperousOne



Joined: 19 Sep 2005
Posts: 115

PostPosted: Mon Mar 23, 2009 7:59 pm    Post subject: Reply with quote

Took me about 30 minutes of screwing around (after my company upgraded my computer) to find out why I was having this same problem: My simple solution: Change my video card settings to 32bit (vs. 16 that it came defaulted at).

To do this: Right click on your desktop then Click

Properties - Settings Tab - Color quality dropdown

then select 24 or 32 bit.

Note: Perhaps the Help File can be updated to address this issue? Idea
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group