 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
DominicTFY
Joined: 05 Dec 2004 Posts: 10
|
Posted: Thu Mar 24, 2005 12:45 pm Post subject: Layered Window |
|
|
I was tinking since there were the GUI creation, why not proceed to enable the Layered Window part which can serve as an OSD. It is definitely a must have stylish window because it doesn't show any window name and it can always appear "always-on-top"..I saw this command in the C++ language book and found it really nice and interesting.
Currently, once u execute a GUI, there's either a pop-up new window name on the taskbar or there's problem configuring transparency of the "window" or images. With layered window, the problems will be fixed.
Moreover, it | Quote: | | Using a layered window can significantly improve performance and visual effects for a window that has a complex shape, animates its shape, or wishes to use alpha blending effects. The system automatically composes and repaints layered windows and the windows of underlying applications. As a result, layered windows are rendered smoothly, without the flickering typical of complex window regions. In addition, layered windows can be partially translucent, that is, alpha-blended. | - quoted from Microsoft Website
For more information on Layer Window, please visit the following link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowfeatures.asp
and find it under the Layered Window.
really wish it will be dere in the next version of the AutoHotKey!  |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Thu Mar 24, 2005 3:38 pm Post subject: |
|
|
| There is an example of how to do an OSD (transparent window) at the bottom of the GUI page. If this isn't what you had in mind, please clarify. |
|
| Back to top |
|
 |
DominicTFY
Joined: 05 Dec 2004 Posts: 10
|
Posted: Fri Mar 25, 2005 11:34 am Post subject: |
|
|
| Yes, there is a GUI that allows transparency. But what about a window like the GUI, that will not have the script name to pop up as an individual window on the taskbar? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Fri Mar 25, 2005 12:01 pm Post subject: |
|
|
You can prevent the task bar button from appearing with the +Owner option as in this revised example:
CustomColor = EEAA99 ; Can be any RGB color (it will be made transparent below).
Gui, +AlwaysOnTop +LastFound +Owner ; +Owner prevents a taskbar button from appearing.
Gui, Color, %CustomColor%
Gui, Font, s24
Gui, Add, Text, vMyText cLime, XXXXX YYYYY ; 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, -Caption ; Remove the title bar and window borders.
SetTimer, UpdateOSD, 500
Gosub, UpdateOSD ; Make the first update immediate rather than waiting for the timer.
Gui, Show, x0 y400
return
UpdateOSD:
MouseGetPos, MouseX, MouseY
GuiControl,, MyText, X%MouseX%, Y%MouseY%
return |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|