19.12.2012 Views

Computer Programming Concepts and Visual Basic David I. Schneider

Computer Programming Concepts and Visual Basic David I. Schneider

Computer Programming Concepts and Visual Basic David I. Schneider

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

448 <strong>Computer</strong> <strong>Programming</strong> <strong>Concepts</strong> <strong>and</strong> <strong>Visual</strong> <strong>Basic</strong><br />

ROWHEIGHT The statement MSFlexGrid1.RowHeight(m) = n specifies that row m of the<br />

grid be n twips high. (There are about 1440 twips in an inch.)<br />

RSET If str1 is a string variable, the statement RSet str1 = str2 replaces the value of str1<br />

with a string of the same length consisting of str2 truncated or padded on the left with spaces.<br />

RTRIM The value of the function RTrim(str) is the string obtained by removing all the<br />

spaces from the end of the string str. The string str may be either fixed-length or variablelength.<br />

SCALE The method objectName.Scale (x1, y1)–(x2, y2) defines a coordinate system for the<br />

form, picture box, or printer identified by objectName. This coordinate system has horizontal<br />

values ranging from x1 at the left edge of objectName to x2 at the right edge <strong>and</strong> vertical<br />

values ranging from y1 at the top edge of objectName to y2 at the bottom edge. Subsequent<br />

graphics methods <strong>and</strong> control positioning place figures <strong>and</strong> controls in accordance with this<br />

new coordinate system. As a result of using the Scale method, the ScaleMode property of<br />

objectName is set to 0, the ScaleLeft property to x1, the ScaleTop property to y1, the Scale-<br />

Height property to y2–y1, <strong>and</strong> the ScaleWidth property to x2–x1. The method object-<br />

Name.Scale without arguments resets the coordinate system of objectName to the default<br />

coordinate system where the unit of measure is twips <strong>and</strong> the upper-left corner of object-<br />

Name has coordinates (0, 0).<br />

SCALEHEIGHT The property ScaleHeight determines the vertical scale on a form or picture<br />

box. After the statement objectName.ScaleHeight = hght is executed, the vertical coordinates<br />

range from objectName.ScaleTop at the top edge of objectName to<br />

objectName.ScaleTop + hght at the bottom edge. The default value of the ScaleHeight property<br />

is the height of objectName when measured in the units specified by objectName’s<br />

ScaleMode property.<br />

SCALELEFT The property ScaleLeft determines the horizontal coordinate of the left edge<br />

of a form or picture box. After the statement objectName.ScaleLeft = left is executed, the horizontal<br />

coordinates will range from left at the left edge of objectName to left + object-<br />

Name.ScaleWidth at the right edge. The default value of the ScaleLeft property is 0.<br />

SCALEMODE The property ScaleMode determines the horizontal <strong>and</strong> vertical unit of measure<br />

for the coordinate system on a form or picture box. If the ScaleMode property of a form<br />

or picture box is set to 1 (the default), the unit of measure becomes twips. Other possible values<br />

for ScaleMode are 2 for points (72 points = 1 inch), 3 for pixels, 4 for characters (1 horizontal<br />

unit = 120 twips; 1 vertical unit = 240 twips), 5 for inches, 6 for millimeters, <strong>and</strong> 7<br />

for centimeters. A value of 0 for the ScaleMode property indicates that units of measure are<br />

to be determined from the current settings of the ScaleHeight <strong>and</strong> ScaleWidth properties.<br />

<strong>Visual</strong> <strong>Basic</strong> automatically sets the ScaleMode property of an object to 0 when any of the<br />

object’s Scale... properties are assigned values.<br />

SCALETOP The property ScaleTop determines the vertical coordinate of the top edge of a<br />

form or picture box. After the statement objectName.ScaleTop = top is executed, the vertical<br />

coordinates range from top at the top edge of objectName to top + objectName.ScaleHeight<br />

at the bottom edge. The default value for the ScaleTop property is 0.<br />

SCALEWIDTH The property ScaleWidth determines the horizontal scale on a form or picture<br />

box. After the statement objectName.ScaleWidth = wdth is executed, the horizontal coordinates<br />

range from objectName.ScaleLeft at the left edge of objectName to<br />

objectName.ScaleLeft + wdth at the right edge. The default value of the ScaleWidth property<br />

is the width of objectName when measured in the units specified by objectName’s Scale-<br />

Mode property.<br />

SCROLLBARS The ScrollBars property of a grid or text box specifies whether the control<br />

has horizontal (setting = 1), vertical (setting = 2), both (setting = 3), or no (setting = 0) scroll<br />

bars. In order for a text box to have scroll bars, the MultiLine property must be set to True.

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

Saved successfully!

Ooh no, something went wrong!