Jump to content

Recommended Posts

Posted

GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

Not working for icon...

i've search but only find for bmp or gif. not for ico

Is it possible to make background of guictrlcreateicon() tranparent??

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.0.0
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 403, 273, 204, 206)
$Pic1 = GUICtrlCreatePic(@SystemDir & "\oobe\images\newmark8.jpg", 40, 40, 329, 209, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Label1 = GUICtrlCreateLabel("TEXT TEXT TEXT", 136, 168, 94, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT);This Works
$Icon1 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", 8, 144, 80, 73, 73, BitOR($SS_NOTIFY,$WS_GROUP))
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT);Doesnt Work :(
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Thanks before :D

  • Moderators
Posted

DeeRiee,

If you look at this thread, you will understand why the icon is not really transparent. If you search in Yashied's recent posts, I seem to remember that he has developed a UDF which can show transparent icons.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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
×
×
  • Create New...