Jump to content

Displaying a jpg file


 Share

Recommended Posts

I'm trying to create a .scr file using jpg files. How do display the jpg files and stretch them to screen?

Thanks.

Global $picfile = "path\to\file.jpg"
Global $parent = GUICreate("Name of GUI",1600,1200)
GUICtrlCreatePic($picfile,0,0,1600,1200)
GUICtrlSetState($picfile, $GUI_DISABLE)
Edited by Ealric

My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic]

Link to comment
Share on other sites

Place these at the top ( almost always )

#include <GuiConstantsEx.au3>

#include <WindowsConstants.au3>

there are others that are more of "as needed" basis

8)

I added it at the top and ran the script. Nothing happened. I added a Sleep(2000) at the end and still nothing happened. I'm new at this what am I missing.

Thanks.

Link to comment
Share on other sites

I added it at the top and ran the script. Nothing happened. I added a Sleep(2000) at the end and still nothing happened. I'm new at this what am I missing.

Thanks.

Try this. A complete working script for your perusal.

#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>

Global $picfile = "path\to\file.jpg"
Global $parent = GUICreate("Name of GUI",@DesktopWidth,@DesktopHeight,-1,-1,$WS_POPUPWINDOW)
GUICtrlCreatePic($picfile,0,0,@DesktopWidth,@DesktopHeight)
GUICtrlSetState($picfile, $GUI_DISABLE)
GUISetState()

Do
sleep(20)
until GUIGetMsg() = -3 ; Esc to exit
Link to comment
Share on other sites

Try this. A complete working script for your perusal.

#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>

Global $picfile = "path\to\file.jpg"
Global $parent = GUICreate("Name of GUI",@DesktopWidth,@DesktopHeight,-1,-1,$WS_POPUPWINDOW)
GUICtrlCreatePic($picfile,0,0,@DesktopWidth,@DesktopHeight)
GUICtrlSetState($picfile, $GUI_DISABLE)
GUISetState()

Do
sleep(20)
until GUIGetMsg() = -3 ; Esc to exit

Thanks, how can I nest or include the .jpg files in the .scr file and not in a seperate folder?

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