au3scr Posted October 10, 2008 Posted October 10, 2008 $Pic2 = GUICtrlCreatePic(@ScriptDir&"\linux-logo2.jpg", 150, 0, 50, 50) <-- this dont work , But I need to ise thisbut$Pic2 = GUICtrlCreatePic(@ScriptDir&"\linux-logo2.bmp", 150, 0, 50, 50) WorksI need png file cuz Iwant to have picture which background color is transparent.I want replace this white background with gui color (I have made this background color to transparent color with infarnview) and now i need add *.png file to GUI
Szhlopp Posted October 10, 2008 Posted October 10, 2008 $Pic2 = GUICtrlCreatePic(@ScriptDir&"\linux-logo2.jpg", 150, 0, 50, 50) <-- this dont work , But I need to ise this but $Pic2 = GUICtrlCreatePic(@ScriptDir&"\linux-logo2.bmp", 150, 0, 50, 50) Works I need png file cuz Iwant to have picture which background color is transparent. I want replace this white background with gui color (I have made this background color to transparent color with infarnview) and now i need add *.png file to GUI Thank Paulia for this=) #include <GDIPlus.au3> #include <GuiConstantsEx.au3> Opt("MustDeclareVars", 1) ; =============================================================================================================================== ; Description ...: Shows how to display a PNG image ; Author ........: Paul Campbell (PaulIA) ; Notes .........: ; =============================================================================================================================== ; =============================================================================================================================== ; Global variables ; =============================================================================================================================== Global $hGUI, $hImage, $hGraphic ; Create GUI $hGUI = GUICreate("Show PNG", 240, 240) GUISetState() ; Load PNG image _GDIPlus_StartUp() $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Images\Torus.png") ; Draw PNG image $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, 0, 0) ; Loop until user exits do until GUIGetMsg() = $GUI_EVENT_CLOSE ; Clean up resources _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_ImageDispose($hImage) _GDIPlus_ShutDown() behdadsoft 1 RegEx/RegExRep Tester!Nerd Olympics - Community App!Login UDFMemory UDF - "Game.exe+753EC" - CE pointer to AU3Password Manager W/ SourceDataFiler - Include files in your au3!--- Was I helpful? Click the little green '+'
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now