Actually, is it possible to use a transparent PNG as a control? I know you can set it to be the background of a layered GUI, but can I just make one a picture control? Thanks
Nevermind, a little digging got me the answer
------------------
I'm using this example, but it's stretching my images and there's no option to set size, GUICtrlSetPos doesn't work either...
AutoIt
#include <GDIPlus.au3> #include <GuiConstantsEx.au3> #include <WindowsConstants.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", 69, 59, -1, -1, $WS_POPUP) GUISetState() ; Load PNG image _GDIPlus_StartUp() $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Images\nav.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()
The image is 69x59px at 72dpi resolution, and it's getting cut off on both the left and the bottom... Does anyone know why that is?
Edited by magician13134, 24 May 2008 - 02:06 PM.





