Jump to content

Image wont show in GUI


Recommended Posts

Hi! I'm trying to do a simple job of displaying an image in GUI but it doesn't work. i tried using KODA but it does not work.

 

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Form1", 615, 438, 192, 124)
Global $Pic1 = GUICtrlCreatePic("C:\Users\iamauser\Pictures\pictures\picture.bmp", 112, 88, 420, 180)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

 

Link to comment
Share on other sites

@pranaynanda,

there is nothing wrong with your code. it works for me when i put a BMP image in a folder and name similar to yours.

check the full path name (you might have an extra "\pictures" in there) and the validity of the image file.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

The path is correct. I can be sure because it was taken up by Koda when I was trying to configure the image in the form using the load option in the Picture function. However, I do not understand what you mean by validity of the image.

Edited by pranaynanda
Link to comment
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
 Share

  • Recently Browsing   0 members

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