colombeen Posted September 19, 2014 Share Posted September 19, 2014 (edited) Hi guys is it normal that when I try to update the $test = GUICtrlCreatePic ("", 20, 20, 100, 100) with guictrlsetimage ($test, $the_URL, 0, 0) that nothing changes? i get the result 0 when I do the same thing with an image that's in the same folder with just the image name it works. can't the function handle URLs ? Edited September 19, 2014 by colombeen Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 19, 2014 Moderators Share Posted September 19, 2014 colombeen, can't the function handle URLs ?From the Help file for: GUICtrlCreatePic:filename: filename of the picture to be loaded : supported types BMP, JPG, GIF(but not animated)GUICtrlSetImage:filename: The filename containing the picture to be display on the control. Nothing about URLs there. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
colombeen Posted September 19, 2014 Author Share Posted September 19, 2014 it doesn't say that it doesn't support urls... does anyone know how to fix this with urls? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 19, 2014 Moderators Share Posted September 19, 2014 colombeen, it doesn't say that it doesn't support urlsTrue, but it does not say that it does not support paper drawings from my neighbour's school kid either. What it does say is that it only supports filenames. Perhaps you could download the image to a temporary file and use that. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
colombeen Posted September 19, 2014 Author Share Posted September 19, 2014 (edited) for an active directory app that needs to be fast... it would take to long to load everything if i have to download them seperately first... :-s and downloading them all would be crazy... it would be like 12.000 images Edited September 19, 2014 by colombeen Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 19, 2014 Moderators Share Posted September 19, 2014 colombeen,As you are dealing with an Active Directory app you might like to post in water's Active Directory UDF thread - he may be able to help. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
colombeen Posted September 19, 2014 Author Share Posted September 19, 2014 (edited) yeah but showing an image in a GUI isn't really AD related... until I find a solution, i've just added a button that starts IE with the image URL. Edited September 19, 2014 by colombeen Link to comment Share on other sites More sharing options...
UEZ Posted September 19, 2014 Share Posted September 19, 2014 Try this: ;coded by UEZ 2011 #include <GUIConstantsEx.au3> #include <GDIPlus.au3> _GDIPlus_Startup() Global Const $STM_SETIMAGE = 0x0172 Global Const $hBmp = _GDIPlus_BitmapCreateFromMemory(InetRead("http://aut1.autoit-cdn.com/forum/public/style_images/master/logo_autoit.png"), True) ;to load an image from the net Global Const $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hBmp) Global Const $iWidth = _GDIPlus_ImageGetWidth($hBitmap) Global Const $iHeight = _GDIPlus_ImageGetHeight($hBitmap) Global Const $hGUI = GUICreate("Display PNG Image in picture control", $iWidth, $iHeight) Global Const $idPic = GUICtrlCreatePic("", 0, 0, $iWidth, $iHeight) _WinAPI_DeleteObject(GUICtrlSendMsg($idPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hBmp)) GUISetState() While True Switch GUIGetMsg() Case $idPic MsgBox(0, "Information", "PNG image was clicked") Case $GUI_EVENT_CLOSE _WinAPI_DeleteObject($hBmp) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_Shutdown() GUIDelete($hGUI) Exit EndSwitch WEnd Br, UEZ maniootek 1 Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
iamtheky Posted September 19, 2014 Share Posted September 19, 2014 (edited) But UEZ, he wants to do it magically without downloading the image first. You know, like how you dont have to download resources when using the URL /sarcasm edit: was not necessarily sarcastic enough to be identified as sarcasm Edited September 19, 2014 by boththose ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
colombeen Posted September 19, 2014 Author Share Posted September 19, 2014 But UEZ, he wants to do it magically without downloading the image first. You know, like how you dont have to download resources when using the URL /sarcasm edit: was not necessarily sarcastic enough to be identified as sarcasm If this is the kind of response I can expect I just won't ask anything anymore. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 19, 2014 Moderators Share Posted September 19, 2014 colombeen,If you ask silly questions then you must expect a certain degree of banter in return, as witnessed by my post above. Ask sensible questions and you will get sensible replies. Your choice. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
iamtheky Posted September 19, 2014 Share Posted September 19, 2014 (edited) If you are going to dismiss the downloading of images as 'taking too long' when your stated method downloads the images, then you could stand to be less sensitive when it gets pointed out. Regardless of the tact i so severely lack. Melba wins the race again... Edited September 19, 2014 by boththose ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
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