Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gething jpg image from web ti Timage

Status
Not open for further replies.

Allan33

Programmer
Aug 7, 2003
4
DK
Hi

I hope somebody can help me.

I want to get a jpeg picture from a web site down to a Timage.

Like download the file say " and put the picture direct to a Timage on my form

Please help

Thx Allan33
 
You should use TClintSocket to download an image.
Connection string like this:
//------------------------------------------------
AnsiString cmd = "GET HTTP/1.0\r\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/pdf, application/x-shockwave-flash, application/vnd.ms-excel, application/msword, */*\r\nAccept-Language: ru\r\nAccept-Encoding: gzip, deflate\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)\r\nHost: Keep-Alive\r\n\r\n";
//------------------------------------------------------

After, you can assign this image to TImage
 
Thanks

Im new to this, so i hope you can help me more.

I put this in Onconnect or OnConnecting, what do i put in address and host??.

On my form i have a butten and the Timage, how do i assign the image to Timage??.

I hope is not to much to ask for.

Please help

Allan33
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top