Jump to content

Recommended Posts

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]

Posted

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.

Posted

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
Posted

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?

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
×
×
  • Create New...