Sign in to follow this  
Followers 0
vladedoty

how do i open a jpg?

7 posts in this topic

#1 ·  Posted (edited)

how do i press a button on my gui and have it create a dummy window from a jpg?

Edited by vladedoty

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

shellexecute("picture.jpg")

cool i guess i am doing this wrong then cause when i do this it opens in Paint maximizied

What i am trying to do is when i press a button on the gui it opens a "dummy window" sized at 940 x 520

and i was just going to use the jpg i created in paint for the dummy window

is this easily done?

Edited by vladedoty

Share this post


Link to post
Share on other sites

vladedoty,

Using ShellExecute tells Windows to open the file with the default application for that type of file - you obviously have .jpg associated with Paint. ;)

What exactly do you mean by "dummy window"? Something like this? :blink:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$hGUI = GUICreate("Test", 500, 500)

$hButton = GUICtrlCreateButton("Show JPG", 10, 10, 80, 30)

GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $hButton
            GUISetState(@SW_HIDE, $hGUI)
            GUICreate("", 300, 300, Default, Default, $WS_POPUP)
            GUICtrlCreatePic("Your.jpg", 0, 0, 300, 300)
            GUISetState()
    EndSwitch
WEnd

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Using ShellExecute tells Windows to open the file with the default application for that type of file - you obviously have .jpg associated with Paint. ;)

Well, the initial question was "how do i open a jpg?" :blink:...

Share this post


Link to post
Share on other sites

KaFu,

My dear chap, not at all a dig at you - my immediate thought was exactly the same. :blink:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

No offense taken ;), my thought was that he wanted exactly something like the sample you posted... but I didn't wanted to answer a question which I've had to formulate myself :blink: ...

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  
Followers 0