Sign in to follow this  
Followers 0
BrettF

GUICtrlCreatePicture with online pic?

4 posts in this topic

I'm tring to get this picture () to show in my GUI. The picture is valid and all, it's just that i cant put it in. Its really getting annoying. The reason its online is that is a weather radar image and it updates.... Please help :). (I hope this is the right forum, to GUI help and support....)

Thanks,

Bert

Share this post


Link to post
Share on other sites



You will need to use InetGet() to download the picture first to show it in your Gui.

Share this post


Link to post
Share on other sites

Thanks but it still dosnt work:

#include <GUIConstants.au3>
#include <INET.au3>
$site = InetGet ("http://www.autoitscript.com/forum/style_images/autoit/logo4.gif")
Global $imgtype
$Form1 = GUICreate("AForm1", 609, 663, 201, 115)
$Pic1 = GUICtrlCreatePic("", 2, 5, 393, 393, BitOR($SS_NOTIFY, $WS_GROUP))
GUICtrlSetData(-1, $site)
$Combo1 = GUICtrlCreateCombo("Height...", 408, 72, 97, 25, $CBS_DROPDOWNLIST)
GUICtrlSetData(-1, "64km|128km|256km")
GUICtrlSetState($Combo1, $GUI_CHECKED)
$Radio1 = GUICtrlCreateRadio("Loop", 408, 48, 113, 17)
$Radio2 = GUICtrlCreateRadio("Static", 408, 32, 113, 17)
$Button1 = GUICtrlCreateButton("Update!", 408, 104, 75, 25, 0)
$Group1 = GUICtrlCreateGroup("Radar Options", 400, 0, 202, 145)
$Label1 = GUICtrlCreateLabel("SEQ Weather Radar:", 406, 14, 180, 17)
$Group2 = GUICtrlCreateGroup("Weather Warnings", 2, 400, 601, 257)
$Edit1 = GUICtrlCreateEdit("", 8, 416, 585, 233, BitOR($ES_READONLY, $ES_WANTRETURN, $WS_HSCROLL, $WS_VSCROLL))
GUICtrlSetData(-1, "")
$Edit2 = GUICtrlCreateEdit("", 400, 147, 201, 249, BitOR($ES_WANTRETURN, $WS_VSCROLL))
GUICtrlSetData(-1, "This program was created for free by exod-soft:" & @CRLF & " www.freewebs.com/exod-soft." & @CRLF & @CRLF & @CRLF & "Images supplied by the Australian Bureau of Metorology." & @CRLF & @CRLF & @CRLF & "Copywrite 2007, Exod-Soft.")
GUISetState(@SW_SHOW)
While 1
    $Msg = GUIGetMsg()
    Select
        Case $Msg = $GUI_EVENT_CLOSE
            Exit
        Case $Msg = $Button1
        $height = GUICtrlRead($Combo1)
        GUICtrlSetData ($Label1, "SEQ Weather Radar: "& $height & ", " & $imgtype)
        Case $Msg = $Label1

            
        Case $Msg = $Edit1

            
        Case $Msg = $Edit2
            
        Case $Msg = $Radio1
            $imgtype = "Loop"
        Case $Msg = $Radio2
            $imgtype = "Static"
    EndSelect
WEnd

Share this post


Link to post
Share on other sites

make the following changes:

InetGet ("http://www.autoitscript.com/forum/style_images/autoit/logo4.gif",@TempDir&'\logo4.gif')
Global $imgtype
$Form1 = GUICreate("AForm1", 609, 663, 201, 115)
$Pic1 = GUICtrlCreatePic(@TempDir&'\logo4.gif', 2, 5, 393, 393, BitOR($SS_NOTIFY, $WS_GROUP))
;GUICtrlSetData(-1, $site)

----[ SandyD ]---

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0