Jump to content

How to show a JPG file?


SWINX
 Share

Recommended Posts

This works:

GUICtrlCreateButton ("my picture button", 10,20,40,40, $BS_ICON)
GUICtrlSetImage (-1, "shell32.dll",22)

But when I try to show a JPG, it doesn't work out.

I also tried this:

$imgInstallFiles = GUICtrlCreatePic("..\_shared\true.jpg", 10, 53, 15, 15)

But also that didn't show my picture :)

Also tried to specify the full path to the image, but nothing seems to work :D

Somebody who knows why, and how to fix it?

Link to comment
Share on other sites

i think bitmaps and icons are the only image types allowed for buttons

from the helpfile: " In both case the $BS_ICON or $BS_BITMAP styles are needed to select the type of the picture used."

You can use GUICtrlCreatePic and assign events to it, but it won't appear to push and release like a button does...

Edited by quaizywabbit
[u]Do more with pre-existing apps![/u]ANYGUIv2.8
Link to comment
Share on other sites

i accomplished it before :) just make it so when the image is clicked it changes pictures

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

It still didn't work, but the problem seemd to be you have to specify a FULL path, it works fine now.

<{POST_SNAPBACK}>

Try using macros in your code. It will make your code more portable and easier to work with.

Example:

$Funnybtn = GUICtrlCreatePic(@WorkingDir & "\msgbox.jpg",0,0,0,0)

Aye, What Slim said... :)

Edited by Kerberuz

Kerby

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...