Jump to content
Renderer

Autoit Label Background Image

Recommended Posts

Renderer

Hello guys! Is it posible to set up a background image for a label? Thanks in advance!

Share this post


Link to post
Share on other sites
Danyfirex

Hello. Yes is Possible.

 

Saludos

Share this post


Link to post
Share on other sites
AutoBert

here a small  script:

; *** Start added by AutoIt3Wrapper ***
#include <StaticConstants.au3>
; *** End added by AutoIt3Wrapper ***
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Add_Constants=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Example()

Func Example()
    GUICreate("My GUI picture", 350, 300, -1, -1, $WS_SIZEBOX + $WS_SYSMENU) ; will create a dialog box that when displayed is centered
    GUISetBkColor(0xE0FFFF)
    Local $sPicPath=StringReplace(StringReplace(@AutoItExe,'_64',''),'autoit3.exe','')
    GUICtrlCreatePic($sPicPath&"Examples\GUI\mslogo.jpg", 0, 0, 3500, 300)
    GUICtrlSetState(-1,$GUI_DISABLE)
    GUICtrlCreatePic($sPicPath&"Examples\GUI\msoobe.jpg", 50, 50, 200, 30)
    GUICtrlSetState(-1,$GUI_DISABLE)
    Local $idLabel=GUICtrlCreateLabel('Label on Pic', 50, 50, 200, 30, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1,14,600)
    GUISetState(@SW_SHOW)

    ; Loop until the user exits.
    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
            Case $idLabel
                MsgBox(0,'Test','Labelclick')
        EndSwitch
    WEnd

    GUIDelete()
EndFunc   ;==>Example

 

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

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.