surveyor1 Posted December 16, 2008 Posted December 16, 2008 I'm trying to create a .scr file using jpg files. How do display the jpg files and stretch them to screen? Thanks.
Ealric Posted December 16, 2008 Posted December 16, 2008 (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 December 16, 2008 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]
surveyor1 Posted December 16, 2008 Author Posted December 16, 2008 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.
Valuater Posted December 16, 2008 Posted December 16, 2008 Place these at the top ( almost always ) #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> there are others that are more of "as needed" basis 8)
surveyor1 Posted December 16, 2008 Author Posted December 16, 2008 Place these at the top ( almost always )#include <GuiConstantsEx.au3>#include <WindowsConstants.au3>there are others that are more of "as needed" basis8)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.
Malkey Posted December 16, 2008 Posted December 16, 2008 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
surveyor1 Posted December 17, 2008 Author Posted December 17, 2008 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?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now