Jump to content

Recommended Posts

Posted

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

Posted

Letis

As 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

:)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...