Letis Posted January 21, 2009 Posted January 21, 2009 (edited) Hi I have a background with external picture$picture = GUICtrlCreatePic("C\:background.jpg",0,0,210,80)Is there any way how to give into background the picture from internet? example: something like this doesnt work why?$picture = GUICtrlCreatePic("http://www.autoitscript.com/background.jpg",0,0,210,80) Edited January 21, 2009 by Letis
KJohn Posted January 22, 2009 Posted January 22, 2009 Hi I have a background with external picture$picture = GUICtrlCreatePic("C\:background.jpg",0,0,210,80)Is there any way how to give into background the picture from internet? example: something like this doesnt work why?$picture = GUICtrlCreatePic("http://www.autoitscript.com/background.jpg",0,0,210,80)Use Inetget to download the picture from the internet to the local machine and then use GUICtrlcreatePic with the local path... Check the documentation for more details...
rasim Posted January 22, 2009 Posted January 22, 2009 LetisAs has sayed the Koshy John use the Inetget function:$sURL = "http://www.autoitscript.com/images/autoit_6_240x100.jpg" $sFilePic = @TempDir & "\pic.jpg" If InetGet($sURL, $sFilePic, 1) = 0 Then Exit MsgBox(16, "Error", "Unable to download a file") #include <GuiConstantsEx.au3> $hGUI = GUICreate("Test", 300, 200) $cPic = GUICtrlCreatePic($sFilePic, 0, 0, 300, 200) GUICtrlSetState(-1, $GUI_DISABLE) GUISetState(@SW_SHOW) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE
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