objects 537
menu items. See also menus
adding access keys, 100
adding access keys to, 119
adding to menu commands,
98–99
changing order of, 102, 119
creating, 119
deleting, 102
guidelines for, 100
naming, 104
shortcut keys, assigning, 102,
117–19
Menu program
folder location, 105, 114
menus and dialog boxes in, 114
running, 105–06, 115–17
menus. See also menu items
event procedures, editing, 102–05
running, 88
MenuStrip control (Toolbox)
displaying objects, 98
overview, 97
shortcut keys, assigning, 117–18
message boxes. See also dialog
boxes
creating, 74–75
displaying, 235
displaying information on
forms, 133
MessageBox class, 134
metafiles, Windows, 112
methods
calling, 157
creating in classes, 405–06, 412
defined, 75, 91
Graphics .DrawString, 420–23
math, 152
Print, 418, 437
ShowDialog, 112
Microsoft Access. See Access
Microsoft Intellisense, 53, 71
Microsoft OLE DB, 448
Microsoft .Jet .OLEDB error
message, 444
minimizing forms at run time, 374
MinimumSize property, 364
Minute (date) method,
description, 107
mistakes, identifying by jagged
lines, 54–55
mnuOpenItem Click event
procedure, 343–44
mnuSaveAsItem_Click event
procedure, 338
Mod (remainder division operator),
143, 148
modal forms, 357
modeless forms, 352
modules
adding, 252–55
adding existing, 270
creating, 248–51, 270
overview, 248
removing, 270
removing from projects, 251
renaming, 250, 270
saving, 250–51
Month (date) method,
description, 107
mouse events, detecting, 177–78
moving
objects, 42, 64
objects in Control
collections, 311
objects on forms, 380–82
tool windows, 17–19, 34
toolbar buttons, 110
Moving Icon program
animating sun icon, 382–85
folder location, 385
running, 385–86
MSDN Online Help, 27–28
MSDN, switching views in, 27
MsgBox function
creating message boxes, 74–75
displaying contents of variables,
133–35
Xor (logical operator)
encryption, 340
Multiline property, 183–86
multiline text boxes, size limit, 185
multiplication operator (*),
143, 147
multi-targeting feature, 39
Music Trivia program
closing, 13
opening, 5–7
running, 11–13
My namespace
accessing forms using, 356
overview, 314–16
reading text files with, 345
writing text files, 346
My .Computer .FileSystem object
ReadAllText method, 315–21
WriteAllText method, 321–23
N
Name property, 174–75, 302–04
namespaces, 90
naming
classes, 403
conventions for variables, 130
data, 124
menu items, 104
navigation controls
adding second, 484
adding to forms, 466
navigation toolbar, 456–57
New Connection button, 446
New Project command (File Menu)
and Windows Installer, 63
console applications, 373
New Project dialog box, 38–39, 68
New Project link (Start Page), 38
New Web Site command, 496
Next keyword, 182, 184
non-modal forms, 352, 357
nonstandard dialog boxes, 117
Not (logical operator), 167
not equal to operator (<>), 161, 331
Now property, description, 107
number computation, random, 57
number sequences, creating in
loops, 185–89
numbers, converting letters to, 340
numeric values, encrypting, 340
O
Object data type, 136
object variables
declaring to use classes, 412
setting properties for, 413
object-oriented programming
(OOP), 393
objects. See also specific objects
adding, 40–42
aligning to hidden, 42
anchoring, 368–71, 374
animating, 391
changing property settings,
14–16, 47
choosing database, 449–50,
469–71
control, 365–66
creating based on new classes,
407–08
creating standard-sized, by
double-clicking, 183
defined, 13, 90
deleting, 43, 65
docking, 368–71, 374
events supported by
Visual Basic, 160
expanding, shrinking at
run time, 391
in collections, 297–98
index position of, 298
moving, 64, 311, 391
multiline text box,
size limits of, 185
processing, in collections, 311