Function Reference


WinSetTrans

Sets the transparency of a window.

WinSetTrans ( "title", "text", transparency )

Parameters

title The title/hWnd/class of the window to change. See Title special definition.
text The text of the window to change. See Text special definition.
transparency A number in the range 0 - 255. The lower the number, the more transparent the window will become. 255 = Solid, 0 = Invisible.

Return Value

Success: Non-zero.
Failure: 0 and sets the @error flag to non-zero if no supported on the OS.

Remarks

Screen color must be greater or equal to 16-bit.

Example

Example()

Func Example()
    ; Run Notepad
    Run("notepad.exe")

    ; Wait 10 seconds for the Notepad window to appear.
    Local $hWnd = WinWait("[CLASS:Notepad]", "", 10)

    ; Set the transparency of the Notepad window to 170.
    WinSetTrans($hWnd, "", 170)

    ; Wait for 2 seconds to display the Notepad window.
    Sleep(2000)

    ; Close the Notepad window using the handle returned by WinWait.
    WinClose($hWnd)
EndFunc   ;==>Example