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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Focus Default Default Number<br />

First Button 0<br />

Second Button 256<br />

Third Button 512<br />

Icon Icon Number<br />

Stop sign 16<br />

Question mark 32<br />

Exclamation mark 48<br />

Information 64<br />

The value of the function MsgBox(prompt, buttons, title) indicates which of the displayed<br />

buttons the user pushed; in all other aspects the MsgBox statement <strong>and</strong> function act in the<br />

same manner. The values returned for each of the possible buttons pressed are 1 for OK, 2<br />

for Cancel (or Esc), 3 for Abort, 4 for Retry, 5 for Ignore, 6 for Yes, <strong>and</strong> 7 for No.<br />

MULTILINE The property MultiLine determines whether or not a text box can accept <strong>and</strong><br />

display multiple lines. If the MultiLine property of a text box is set to True, then text entered<br />

in the text box will wrap to a new line when the right side of the text box is reached. Pressing<br />

the Enter key will also start a new line. If the MultiLine property of a text box is set to<br />

False (the default), input is restricted to a single line that scrolls if more input is entered than<br />

can be displayed within the width of the text box.<br />

NAME (Property) The property Name is used at design time to give a meaningful name to<br />

a form or control. This new name will then be used by <strong>Visual</strong> <strong>Basic</strong> in naming all event procedures<br />

for the form or control.<br />

NAME (Statement) The statement Name “filespec1”As “filespec2”is used to change the<br />

name <strong>and</strong>/or the directory of filespec1 to the name <strong>and</strong>/or directory specified by filespec2.<br />

The two filespecs must refer to the same drive. [filespec]<br />

NEW The keyword New is used with Set, to create an instance of a class. A typical statement<br />

is Set objectVariable As New className.<br />

NEWINDEX The NewIndex property of a combo box or list box gives the index number of<br />

the item most recently added to the list.<br />

NEWPAGE The method Printer.NewPage indicates that the current page of output is complete<br />

<strong>and</strong> should be sent to the printer.<br />

NOT (Bitwise Operator) The expression Not byte1 is evaluated by expressing the byte as an<br />

8-tuple binary number <strong>and</strong> then Notting each individual digit, where Not 1 is equal to 0,<br />

while Not 0 is equal to 1. For example, the expression Not 37 translated to binary 8-tuples<br />

becomes Not 00100101. Notting each digit gives the binary 8-tuple 11011010 or decimal<br />

218; thus Not 37 is 218.<br />

NOT (Logical Operator) The logical expression Not condition1 is true if condition1 is false<br />

<strong>and</strong> false if condition1 is true. For example, Not (3”moon”is false.<br />

NOTHING The keyword Nothing is used with Set to discontinue the association of an object<br />

variable with a specific object. A typical statement is Set objectVariable = Nothing. Assigning<br />

Nothing to an object variable releases all the system <strong>and</strong> memory resources associated<br />

with the previously referenced object when no other variable refers to it.<br />

NOW The value of the function Now( ) is the serial date for the current date <strong>and</strong> time as<br />

recorded on the computer’s internal clock. [date]<br />

Appendix C 443

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

Saved successfully!

Ooh no, something went wrong!