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.

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

computer also draws its radius line. The ratio of the length of the vertical diameter to the<br />

length of the horizontal diameter will be a. After the Circle method is executed, the value of<br />

objectName.CurrentX becomes x <strong>and</strong> the value of objectName.CurrentY becomes y. [color]<br />

[coordinate systems] [radians]<br />

CLEAR The method ClipBoard.Clear clears the clipboard, setting its contents to the null<br />

string. The statements List1.Clear <strong>and</strong> Combo1.Clear remove all items from the control’s list.<br />

CLICK The Click event applies to check boxes, combo boxes, comm<strong>and</strong> buttons, directory<br />

list boxes, file list boxes, forms, frames, grids, images, labels, list boxes, menu items, OLE<br />

controls, option buttons, picture boxes, <strong>and</strong> text boxes. A Click event occurs whenever the<br />

left mouse button is pressed <strong>and</strong> released while the mouse cursor is over the control or over<br />

a blank area on the form. In the case of a comm<strong>and</strong> button, the Click event is also called if<br />

the spacebar or Enter key is pressed while the comm<strong>and</strong> button has the focus, or if the button’s<br />

access key is used.<br />

CLNG The function CLng converts byte, integer, single-precision, double-precision, <strong>and</strong><br />

currency numbers to long integer numbers. If x is any number from –2,147,483,648 to<br />

2,147,483,647, the value of CLng(x) is the (possibly rounded) long integer constant that x<br />

determines.<br />

CLOSE The statement Close #n closes the file that has been opened with reference number<br />

n. By itself, Close closes all open files. The Close method for a data control closes the database.<br />

CLS The method formName.Cls clears the form formName of all text <strong>and</strong> graphics that have<br />

been placed directly on the form with methods like formName.Print, formName.Circle, <strong>and</strong><br />

so on. The method pictureBox.Cls clears the named picture box. The Cls method resets the<br />

CurrentX <strong>and</strong> CurrentY properties of the cleared object to the coordinates of the upper-left<br />

corner [usually (0, 0)].<br />

COL <strong>and</strong> ROW The Col <strong>and</strong> Row properties specify the current cell of a grid. The statements<br />

MSFlexGrid1.Col = m <strong>and</strong> MSFlexGrid1.Row = n specify the cell in column m <strong>and</strong><br />

row n to be the current cell. The statement MSFlexGrid1.Text = str places the string into the<br />

current cell. When the user clicks on a nonfixed cell, its column number is assigned to the<br />

Col property <strong>and</strong> its row number is assigned to the Row property.<br />

COLALIGNMENT The statement MSFlexGrid1.ColAlignment(m) = n, aligns the text in<br />

column m both vertically <strong>and</strong> horizontally according to the following table.<br />

n Horizontally Vertically<br />

0 Left Top<br />

1 Left Centered<br />

2 Left Bottom<br />

3 Centered Top<br />

4 Centered Centered<br />

5 Centered Bottom<br />

6 Right Top<br />

7 Right Centered<br />

8 Right Bottom<br />

9 Strings left-justified<br />

Numbers right-justified<br />

COLOR The value of the Color property of a Color common dialog box identifies the selected<br />

color.

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

Saved successfully!

Ooh no, something went wrong!