Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

SetPicture – PB Docs 2019 – PowerBuilder Library

SetPicture – PB Docs 2019

SetPicture

PowerScript function

Description

Assigns an image stored in a blob to be the image in a Picture
control.

Applies to

Picture controls

Syntax

Argument

Description

picturecontrol

The name of a Picture control in which you want to set the
bitmap.

bimage

A blob containing the new bitmap. bimage must be a valid
picture in bitmap (BMP), Compuserve Graphics Interchange Format
(GIF), Joint Photographic Experts Group (JPEG), run-length
encoded (RLE), or Windows Metafile (WMF).

Return value

Integer.

Returns 1 if it succeeds and -1 if an error occurs. If any
argument’s value is null, SetPicture returns null.

Usage

If you use FileRead to get the bitmap image from a file, remember
that the FileRead function can read a maximum of 32,765 bytes at a time.
To check the length of a file, call FileLength. If the file is over 32,765
bytes, you can call FileRead more than once and concatenate the return
values, or you can call FileReadEx.

For Unicode files and files that you convert to Unicode, you must
make sure that the file length value is an even number. Otherwise FileRead
or FileReadEx cannot parse the entire file.

Examples

These statements allow the user to select a file and then open the
file and set the Picture control p_1 to the bitmap in the selected
file:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x