Source language: Translate to:

Update picture object

Post your suggestions for future versions of NeoBook

Moderator: Neosoft Support

Update picture object

Postby smartmedia » Sat Jun 30, 2007 1:59 pm

Hi...

I wonder how possible is:
Be able to update an picture object from the web...
So in Image file field enter the full path of image on web, or a variable contain the path, and all this to be able to update it automatically.

Seems very interesting and useful to me.

Thanks
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby Gaev » Sat Jun 30, 2007 2:28 pm

smartmedia:
So in Image file field enter the full path of image on web, or a variable contain the path, and all this to be able to update it automatically.

I am assuming you are talking about Run mode and NOT Design mode.

Today you can achieve this with ...
Code: Select all
DownloadFile "http://www.yoursite.com/abc.jpg" "[TempDir]abc.jpg" "HideProgress"
SetObjectFileName "Picture1" "[TempDir]abc.jpg"

... although I would add some code that does ...

CheckInternetConnection
InternetFileExists

... once you decide what to do in case of error, you can combine all this into a Function ...
Code: Select all
Call gkSetObjectFileFromWeb "Picture1" "http://www.yoursite.com/abc.jpg" "optional:[TempDir]abc.jpg" "[PubDir]ErrorImage.jpg"
User avatar
Gaev
 
Posts: 3735
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Neosoft Support » Mon Jul 02, 2007 10:39 am

You could also try using a Web Browser object to display your picture instead. Just enter the path to the image file in the browser's URL field. For example:

http://www.mywebsite.com/mypicture.jpg
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBook Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests