Jump to content
Sign in to follow this  
sbgwb0769

PNG transparency

Recommended Posts

sbgwb0769

post-33165-1224687508_thumb.jpg

How to use "label" control to set up a transparent hot zone for the click??

Attach source code

png.rar

Share this post


Link to post
Share on other sites
ProgAndy

Just use GUICtrlSetBKColor($LAbel,$GUI_BKCOLOR_TRANSPARENT)

Edited by ProgAndy

*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
sbgwb0769

"GUICtrlSetBKColor($LAbel,$GUI_BKCOLOR_TRANSPARENT)" Hot zone is not, you can test! Thank you to answer!

Share this post


Link to post
Share on other sites
sbgwb0769

No one to help ah?

Share this post


Link to post
Share on other sites
ProgAndy

Make the overlay GUI not completely transparent, but use 1: WinSetTrans($PNG_GUI[1],"",1)


*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
sbgwb0769

Point to specific examples of what to write? Thank you, the! Ha ha

Share this post


Link to post
Share on other sites
ProgAndy

Add the line below the CreateTransWin:

#include <PNGbackgroundUDF.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>

$PNG_GUI = CreateTransparentGUI("PNGͼƬÏÔʾ(͸Ã÷)","Background1.png",0,240,0,100,-1,-1)
WinSetTrans($PNG_GUI[1],"",1); the control gui is nearly invisible, but not completely :)

$player = GUICtrlCreateLabel("", 40, 20, 30, 30, -1)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT); transparency????????
GUICtrlSetCursor(-1, 0)
GUICtrlSetColor(-1, 0xffffff)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        case $player
            MsgBox(0, "", "player", 5)
    EndSwitch
WEnd
Edited by ProgAndy

*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
sbgwb0769

Oh, I would like to thank the Oh, finally a solution to this problem! Really thank!

Share this post


Link to post
Share on other sites
sbgwb0769

The problem for a long time just to go, here we go again a new set of transparency, and that other controls do not show up, how do

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  

×