LoadInk

Description

Loads ink from a file or blob into an InkPicture control.

Applies to

InkPicture controls

Syntax

inkpicname.LoadInk ( t | b )

Argument

Description

inkpicname

The name of the InkPicture control into which you want to load ink.

t

A string containing the name and location of a file that contains the ink you want to load into the control.

b

The name of a blob passed by reference that contains the ink you want to load into the control.


Return value

Integer.

Returns 1 for success and -1 for failure.

Usage

Use the LoadInk function to load ink that has been saved to a file or a blob into the control.

Examples

The following example loads ink from a file. Since the user will select a single file, the second argument to GetFileOpenName contains the file's path and its name, so the third argument can be ignored:

string ls_inkpath, ls_inkname
GetFileOpenName("Select Ink File", ls_inkpath,  &
   ls_inkname)
ip_1.LoadInk(ls_inkpath)

The following example loads ink from a blob:

string ls_inkpath, ls_inkname
integer li_filenum
blob lblb_ink

GetFileOpenName("Select Ink File", ls_inkpath,  &
   ls_inkname)
li_filenum = FileOpen(ls_inkpath, StreamMode!)
If li_filenum <> 1 Then   FileRead(li_filenum, lblb_ink)
   FileClose(li_filenum)
   ip_1.LoadInk(lblb_ink)
End If

See also

LoadPicture

ResetInk

ResetPicture

SaveInk

Save