Jump to content
Sign in to follow this  
telmob

[SOLVED!] Boring PNGs... Howto add a PNG to my GUI?

Recommended Posts

telmob

Is there a way to put a PNG in my GUI without looking to small?

I've tried using the examples in the help file, but the PNG looks to small in the gui.

Here's an example:

#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", 840, 240)
GUISetState()
; Load PNG image
_GDIPlus_StartUp()
$hImage   = _GDIPlus_ImageLoadFromFile(@ScriptDir&"\u.png")
; Draw PNG image
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)
_GDIPlus_GraphicsDrawImage($hGraphic, $hImage, 10, 10)
; Loop until user exits
do
until GUIGetMsg() = $GUI_EVENT_CLOSE
; Clean up resources
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_ImageDispose($hImage)
_GDIPlus_ShutDown()

EDIT: Sorry, i should have posted this in the GUI area of the forum....

Edited by telmob

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
Sign in to follow this  

×