Home > database >  PB picture control call network images
PB picture control call network images

Time:09-15

In the development process needs to call the pictures available on the server, such as http://192.168.0.99/test/123/test1/asd.jpg
How should I in the form of p_1. Picturename assignment?
I have done one of two ways
The first is p_1. Picturename="http://192.168.0.99/test/123/test1/asd.jpg"
No effect

The second way:
Ls_file="http://d.hiphotos.baidu.com/album/s%3D1100%3Bq%3D90/sign=98f0a7e1f736afc30a0c3b648329d0b5/2fdda3cc7cd98d109a56e610213fb80e7bec9015.jpg"
Flen=FileLength (ls_file)
//fh=FileOpen (ls_file StreamMode! , Read! , LockRead!)
Fh=FileOpen (ls_file StreamMode! , Read! , Shared! The Replace! , EncodingUTF8!)
IF flen> THEN 32765

IF the Mod (flen, 32765)=0 THEN
Loops=flen/32765
The ELSE
Loops=(flen/32765) + 1
END the IF

The ELSE

Loops=1

End the if
FOR I=1 to loops

Bytes_read=FileRead (fh, b)

Tot_b1=tot_b1 + b

NEXT

FileClose (fh)
P_1. SetPicture (tot_b1)

But when invoking fileopen returns a value of 1, just contact with PB solution! ~

CodePudding user response:

Fileopen and pictrue controls can only access to the local resource file, you can download it with Inet extended object is displayed

CodePudding user response:

If the client and the server is the same local area network (LAN), the picture on the server can be Shared out, and when it is set up access to a Shared on the server does not need to input user name and password, so you can directly call the pictures available on the server,

CodePudding user response:

As PB8 say, show only after download,

CodePudding user response:

How can I download with Inet objects, please comment, thank you!
  • Related