Jump to content
Sign in to follow this  
dandymcgee

Guictrlcreatepic NOT WORKING

Recommended Posts

dandymcgee

Hey guys, I'm trying to get this script to set an image on a GUI, but it just won't seem to work. I don't understand why...!?

#include <GUIConstants.au3>
GUICreate("pic test", 358, 302, 188, 111)
GUICtrlCreatePic(@ScriptDir & "Tic1.png", 160, 64, 43, 41)

GUISetState(@SW_SHOW)
While 1
                $msg = GuiGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
    EndSelect
WEnd

The picture doesn't matter, I just can't seem to get any picture to work. Thanks in advance.

EDIT: Seems as if .png files aren't supported, a jpg of the same image worked perfectly. Ah well.

Edited by dandymcgee

- Dan [Website]

Share this post


Link to post
Share on other sites
Valuater

@ScriptDir & "Tic1.png" is... @ScriptDir & "\Tic1.png"

you left out the slash "\"

8)

Edited by Valuater

NEWHeader1.png

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.