Followers 0

Displaying a jpg file

7 posts in this topic

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

Thanks.

Share on other sites

#2 ·  Posted (edited)

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

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.

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

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?