18.01.2013 Views

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>InduSoft</strong> <strong>Web</strong> <strong>Studio</strong> <strong>VBScript</strong> <strong>Reference</strong> <strong>Manual</strong><br />

LoadPicture<br />

Description Returns a picture object.<br />

Usage objPict = LoadPicture(picturename)<br />

Arguments picturename<br />

The picturename argument is a string expression that indicates the name of the picture file to<br />

be loaded.<br />

Return An object reference to a picture file<br />

Remarks Graphics <strong>for</strong>mats recognized by LoadPicture include bitmap (.bmp) files, icon (.ico) files, runlength<br />

encoded (.rle) files, metafile (.wmf) files, enhanced metafiles (.emf), GIF (.gif) files, and<br />

JPEG (.jpg) files. Once the picture object is loaded, it can be manipulated by other controls (e.g.<br />

ActiveX controls). A runtime error occurs if picturename does not exist or is not a valid picture file.<br />

Use LoadPicture(“”) to clear a particular picture. This function is available on 32-bit plat<strong>for</strong>ms<br />

only.<br />

Example objPic = LoadPicture (“c:\mypictures\picture1.jpg”)<br />

Log<br />

Description Returns the natural logarithm of a number.<br />

Usage realVal = Log(number)<br />

Arguments number<br />

The number argument can be any valid numeric expression greater than 0.<br />

Return A Real.<br />

Remarks The natural logarithm is the logarithm to the base e. The constant e is approximately 2.718282.<br />

You can calculate base-n logarithms <strong>for</strong> any number x by dividing the natural logarithm of x by the<br />

natural logarithm of n as follows: Logn(x) = Log(x) / Log(n)<br />

See also Exp<br />

Example Function Log10(X) ‘ Calculate base-10 logarithm<br />

Log10 = Log(X) / Log(10)<br />

End Function<br />

LTrim<br />

Description Returns a copy of a string without leading spaces (LTrim), trailing spaces (RTrim), or both<br />

leading and trailing spaces (Trim).<br />

Usage strVal = LTrim(string)<br />

Arguments string<br />

Required. Any valid string expression.<br />

Return A String.<br />

Remarks A space “ “ is Chr(32). If string contains Null, Null is returned.<br />

See Also Left, LeftB, Len. LenB, Mid, MidB, Right, RTrim, Trim<br />

Example The following example uses the LTrim, RTrim, and Trim functions to trim leading spaces, trailing<br />

spaces, and both leading and trailing spaces, respectively<br />

Dim MyVar<br />

MyVar = LTrim(" vbscript ") ' MyVar contains "vbscript ".<br />

MyVar = RTrim(" vbscript ") ' MyVar contains " vbscript".<br />

MyVar = Trim(" vbscript ") ' MyVar contains "vbscript".<br />

<strong>InduSoft</strong>, Ltd. 147

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!