Jump to content
Sign in to follow this  
surveyor1

Displaying a jpg file

Recommended Posts

surveyor1

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

Thanks.

Share this post


Link to post
Share on other sites
Ealric

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]

Share this post


Link to post
Share on other sites
surveyor1

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

Thanks for the help, I get an error message on the last line saying the var was being used without being define. how do i define it?

Thanks.

Share this post


Link to post
Share on other sites
Valuater

Place these at the top ( almost always )

#include <GuiConstantsEx.au3>

#include <WindowsConstants.au3>

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

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
surveyor1

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.

Share this post


Link to post
Share on other sites
Malkey

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

Share this post


Link to post
Share on other sites
surveyor1

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?

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.