Sign in to follow this  
Followers 0
jeantje

Text On Desktop

6 posts in this topic

#1 ·  Posted (edited)

Is there any way to draw an unmovable text on te desktop like the vista beta that you see Vista Beta 1 (8966)

Like This:

Posted Image

Edited by jeantje

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Is there any way to draw an unmovable text on te desktop like the vista beta that you see Vista Beta 1 (8966)

Like This:

Posted Image

off the top of my head I can imagine 2 methods...

1) use a GUI and transparency (or possibly a tooltip if you can get it to work)

2) Edit the background picture to include the text...

sysinternals has written a neat program called BGInfo - designed to show text about syst config on the desktop, but can be configured to show anything!!

My Desktop:

This uses stuff from everywhere including sysinternals, the clocks from a prog called clocx, the taskbar I got from customize.org, all icons are either unnamed or CLSID's...My desktop rocks...

back to the topic, the text there is from sysinternals, and can be edited and positioned

hope this is what you were trying to do...If you want a less permanent solution then you might have to use idea 1...

MDiesel

edit...oh...it didn't show the clock...there is usually a big clock there on the left...

Edited by mdiesel

Share this post


Link to post
Share on other sites

off the top of my head I can imagine 2 methods...

1) use a GUI and transparency (or possibly a tooltip if you can get it to work)

2) Edit the background picture to include the text...

sysinternals has written a neat program called BGInfo - designed to show text about syst config on the desktop, but can be configured to show anything!!

My Desktop:

This uses stuff from everywhere including sysinternals, the clocks from a prog called clocx, the taskbar I got from customize.org, all icons are either unnamed or CLSID's...My desktop rocks...

back to the topic, the text there is from sysinternals, and can be edited and positioned

hope this is what you were trying to do...If you want a less permanent solution then you might have to use idea 1...

MDiesel

edit...oh...it didn't show the clock...there is usually a big clock there on the left...

i actually want to use method 1 but i have no idea how it works

Share this post


Link to post
Share on other sites

The Tool BGInfo creates a copy of the background-image and writes it's text on it.

This is an example for Method 1:

#include<WindowsConstants.au3>
#include<WinAPI.au3>
$Desktop = ControlGetHandle("[CLASS:Progman]","","[CLASS:SHELLDLL_DefView]")

$GUI = GUICreate("Desktop",300,50,@DesktopWidth-300,@DesktopHeight-100,$WS_POPUP,BitOR($WS_EX_LAYERED,$WS_EX_TRANSPARENT))
GUISetBkColor(0xABCDEF)
_WinAPI_SetLayeredWindowAttributes($GUI,0xABCDEF)
_WinAPI_SetParent($GUI,$Desktop)

GUICtrlCreateLabel("Desktop Text",0,0,300,300)
GUICtrlSetFont(-1,14,800)
GUICtrlSetColor(-1,0x1212FF)

GUISetState()
While 1
    Sleep(100)
WEnd
;===============================================================================
;
; Function Name:   _WinAPI_SetLayeredWindowAttributes
; Description::    Sets Layered Window Attributes:) See MSDN for more informaion
; Parameter(s):
;                  $hwnd - Handle of GUI to work on
;                  $i_transcolor - Transparent color
;                  $Transparency - Set Transparancy of GUI
;                  $isColorRef - If True, $i_transcolor is a COLORREF( 0x00bbggrr ), else an RGB-Color
; Requirement(s):  Layered Windows
; Return Value(s): Success: 1
;                  Error: 0
;                   @error: 1 to 3 - Error from DllCall
;                   @error: 4 - Function did not succeed - use
;                               _WinAPI_GetLastErrorMessage or _WinAPI_GetLastError to get more information
; Author(s):       Prog@ndy
;
; Link :           @@MsdnLink@@ SetLayeredWindowAttributes
; Example :        Yes
;===============================================================================
;
Func _WinAPI_SetLayeredWindowAttributes($hwnd, $i_transcolor, $Transparency = 255, $dwFlages = 0x03, $isColorRef = False)
    If $dwFlages = Default Or $dwFlages = "" Or $dwFlages < 0 Then $dwFlages = 0x03
    If Not $isColorRef Then
        $i_transcolor = Hex(String($i_transcolor), 6)
        $i_transcolor = Execute('0x00' & StringMid($i_transcolor, 5, 2) & StringMid($i_transcolor, 3, 2) & StringMid($i_transcolor, 1, 2))
    EndIf
    Local $Ret = DllCall("user32.dll", "int", "SetLayeredWindowAttributes", "hwnd", $hwnd, "long", $i_transcolor, "byte", $Transparency, "long", $dwFlages)
    Select
        Case @error
            Return SetError(@error, 0, 0)
        Case $Ret[0] = 0
            Return SetError(4, _WinAPI_GetLastError(), 0)
        Case Else
            Return 1
    EndSelect
EndFunc   ;==>_WinAPI_SetLayeredWindowAttributes

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

Check the help file under GUI Control Styles. its in the appendix and probably has a lot of answers for you

for transparency use the extended style $WS_EX_TRANSPARENT

this could be what your looking for as far as transparency goes...As for everything else...

look around the other styles - you will have to use a combination of them to do everything: $WS_EX_TOOLWINDOW would be a good start.

Good luck

MDiesel

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0