Jump to content

Autoit Label Background Image


Recommended Posts

Link to comment
Share on other sites

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

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...