Jump to content

Recommended Posts

Posted (edited)

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

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
  • Recently Browsing   0 members

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