|
|
 |

 |
|
Faster Smarter Beginning Programming
|
|
|
Author
|
|
Jim Buyens
|
|
|
Pages
|
352
|
|
Disk
|
N/A
|
|
Level
|
Beginner
|
|
Published
|
11/13/2002
|
|
ISBN
|
9780735617803
|
|
Price
|
$19.99
To see this book's discounted price, select a reseller below.
|
|
|
|
|
 |
|
|
Index
Symbols and Numbers
& (ampersand). See concatenation operators
' (apostrophe), 38, 280
[ ] (brackets), 91
"" (double quotation marks), 54, 91
= (equals sign). See assignment operators
! (exclamation point), 91
- (hyphen), 91
[ left bracket, 91
+ (plus operator), 92
# (pound sign), 280
] (right bracket), 91
_ (underscore), 18
coding comments after, 39
as continuation character, 38
variable naming conventions, 54-55
1stDeck list box, 137
1stHand list box, 194
3GL (third-generation language), 6-7
4GL (fourth-generation language), 6-7
A
a (prefix), subroutines and arguments and, 17, 103
abbreviations, naming conventions, 55
accessibility, 113. See also scope
Active Server Pages (ASP), 302
Activity value, 262-63
Add button, tape calculator example, 72
Add method, ListBox.Items collection, 244
Add New Item dialog box
adding forms, 180-81
adding modules, 183
card dealing example, 185, 189
icons, creating in Picture Viewer, 212-13
Add New Item_Shuffleclass dialog box, 149
Add Reference dialog box, 172
Add Table dialog box, 296
AddHandler statement, 180, 195-96
AddRange method, ListBox.Items collection, 244
AddressOf operator, 95
AdjustFormToPicture subroutine, 221, 223, 225
ADO.NET, 283-94
command objects, 287-88
connections, 284-87
data readers, 289-90
DataAdapter, DataSet, and DataTable objects, 290-94
overview of, 283-84
alias, 87
ampersand (&). See concatenation operators
And operator
bitwise arithmetic and, 94-95
compared with AndAlso operator, 93-94
overview of, 92
AndAlso operator, 94
Apache Web servers, 302
API (application programming interface), 8
apostrophe ('), 38, 280
Appended Type Character, Visual Basic .NET data types, 52
application layer, 8-9
application programming interface (API), 8
ApplicationModal setting, Msgbox, 207
arguments. See also by individual names
declaring, 103-4
defined, 17
identifying with a prefix, 17, 103
passing by reference, 106-8
passing by value, 104-6
passing variable number of, 108-9
arithmetic operators, 80-82
arrays
functions, 131-33
working with, 60-62
As reserved word, Visual Basic .NET, 37
ASP (Active Server Pages), 302
ASP.NET
as component of .NET Framework, 301
creating Web projects, 303-5
examining new Web projects, 305-7
FrontPage and, 306
interactive debugging, 318-19
page creation, 26
page life cycle of, 309-10
programming approach of, 302
testing Web projects, 317-19
.aspx files, 303, 309-10
assemblers, 5
assembly language, 5, 6
AssemblyInfo.vb file, 216-17
assignment operators, 82-88
compound operators, 83
overview of, 82
reference variables and, 85-88
type conversion, 83-85
astrFilename argument, 222-23
At Startup drop-down list, Visual Studio .NET
changing, 31-32
overview of, 30-31
window manipulation, 33-34
Auto-Hide, Visual Studio .NET windows, 34
Autonumber fields, 282
AutoScroll property, 220-21
Autosize property, 70
B
binding, 56
bitmaps, 208, 209
Bits, Visual Basic .NET data types, 52
bitwise operators, 94-95
blocks of code
bottom-up design, and, 16
defined, 14
function/subroutine design guidelines, 114
top-down design and, 16
BMP files, Picture Viewer, 211-13
Bold property, calculator example, 70
booError variable, 264
Boolean data type, 54, 92-93
bottom-up design, 16-17
brackets ([ ]), 91
branch, 13-14
breakpoints, inserting/removing, 99
btnAdd button, 72
btnAdd control, 43-45
btnAdd_Click subroutine, 74, 116
btnClear button, 71
btnDeal_Click subroutine, 190-92
btnEndGame_Click subroutine, 192, 195
btnExit control, 256, 258
btnExit_Click subroutine, 141, 184, 258
btnMultiply_Click subroutine, 116
btnPlay, 185
btnPlay_Click subroutine, 192-96
btnReport control, 256
btnReport_Click subroutine, 263-64, 268
btnShuffle_Click subroutine, 141, 150
btnStartGame_Click subroutine, 186-87, 195
btnSubtract button, 74
btnSubtract_Click subroutine, 116
buttons. See also by individual names
dealing cards project, 184, 185, 187
MsgBox values, 207
Picture Viewer, 215-16, 225-26
Buttons parameter, Msgbox, 206
Button.Text property, 226
ByRef keyword, 106-8, 114
Byte, Visual Basic .NET data types, 52
ByVal keyword, 103-5, 114
C
Calc3 project, 114-17
Calculate subroutine, Calc3 project, 116-17
calculator examples
four-function calculator, 114-17
One-Button Calculator form, 40-48
tape calculator program, 68-75
calling statement, 103
capitalization, naming conventions, 55
card dealing example, 183-200
dealing cards, 190-92
declaring deck, 189
displaying player forms, 185-88
ending game, 192-93
Form1.vb, 196-98
main form, 184-85
moving player forms, 188-89
Player.vb, 199-200
playing a card, 193-96
card shuffling example
shuffle cards program, 135-41
shuffleclass program, 148-51
shuffleclass2 program, 160-65
Case Else statement, 64, 117
case sensitivity
string conversion and, 131
text comparisons and, 89
UCase function, 110
variable names, 55
Case statements, 64
casting, 83
categories, form control, 232-33
CDate function, 127-29
CDbl function, 45-46, 73
central processing unit (CPU), 2, 3-4
character sets, Unicode, 85
check boxes, 239, 251
Checked property, 239
CheckedChanged event, 251
CheckedListBox control, 241, 243
Choose function, Visual Basic .NET, 125
Class statement, 144-45
classes, 167-200. See also by individual names
.NET Framework, 168-73
creating, 144, 147-48
events and, 177-80
forms and, 180-83
inheritance and, 174-75
instantiating, 181
methods within, 144-45
modules and, 183
overloading and polymorphism, 175-77
overview of, 20-21
properties, 145
shuffling example, 148-51
clauses. See by individual names
ClearHand method, 190-91
click events, 251
ClientWidth property, Windows forms, 222
clipboard
copying picture to, 224
displaying picture from, 225
Clipboard.SetDataObject( ) method, 224
CLng ( ) function, 93
CLR (common language runtime), 8-9
cmbState box, 261-62
code. See also blocks of code
adding/removing ListBox entries from, 243-44
defined, 6, 14
errors in, 58-60
lines of, 6
source code, 6
spaghetti, 9
code-behind
class, 303
date evaluator example and, 321-23
Collection functions, 120
ComboBox controls, 240, 256
comma separated value (CSV), 254-55
command controls, 232
command objects, ADO.NET, 287-88
Command window, Visual Studio .NET, 97-98
Command.Type property, 287-88
comments
Randomize( ) statement and, 142
Visual Basic .NET and, 38-39
common dialog box controls, 232-33, 237
common language runtime (CLR), 8-9
comparison operators, 88-91
compilers, 5-7
compile-time binding, 56
component controls, 232
compound operators, 83
computer requirements, Visual Basic .NET, 26
concatenation, 83
concatenation operators, 92, 210-11
condensed notation, XML, 312
Connection tab, Data Link Properties dialog box, 285
connections, ADO.NET, 284-87, 295-96
ConnectionString property, 284-86
constants, 56-57
constructor method, 151-53
container controls, 232
Contents mode, Help menu, 35
continuation characters, 38, 39
control statements, 7
ControlBox property, 182
controls. See also form controls; see also by individual names and types
adding to Web forms, 311
HTML server controls, 311-13
Web server controls, 313-14
Controls collection, 235
Conversion functions, 120
conversion, numeric data types, 84
Coordinated Universal Time (UTC), 126
Copy.bmp, Picture Viewer icons, 211-13
copying form controls, 234
CPU (central processing unit), 2, 3-4
crocodile sighting form example, 254-74
form creation, 255-59
Form1.vb, 270-74
input field validation, 259-65
output record, 265-69
overview of, 254-55
CSV (comma separated value), 254-55
Customize Toolbox dialog box, 233
D
Data Adapter Configuration Wizard, 295-96
data declarations, 7
data entry controls, 232
data exchange, Web forms, 316-17
Data Link Properties dialog box, 284-85
data readers, ADO.NET, 289-90
Data Source setting, ADO.NET, 286
data types. See also by individual names
applying, 52-53
Boolean, 54, 92-93
conversion, 81-85, 124
Date, 54
Decimal, 54
declaring constants and, 57
for literals, 53-54
methods that operate on, 88
naming, 17
numeric, 81-82
overview of, 4-5
String, 54
syntax of, 39
DataAdapter object, ADO.NET, 289, 290-94
database management system (DBMS), 275-77
databases. See also ADO.NET
displaying and updating, 294-300
overview of, 275-78
SQL concepts and syntax, 278-83
DataGrid object, 297-300
DataLink Properties dialog box, 295-96
DataSet object, ADO.NET, 290-94
DataSource property, 297
DataTable object, ADO.NET, 289, 290-94
date evaluator example, 319-23
DateAdd function, 128
DateDiff function, 128
dates
Date data type, 54
DateAndTime functions, 120
manipulating Date functions, 126-29
DateSerial function, 128
DateValue function, 128-29
dblEntry variable, 73
dblTotal, 73
DBMS (database management system), 275-77
Deal button, card dealing example, 190-92
dealing cards. See card dealing example
Debug menu, 98
Debug (run) mode, Visual Studio .NET, 44, 47
Decimal data type, 54
decision statements, 63-64
decision structures, 10-13
decisions, 51
Deck.vb file
dealing cards project, 184
shuffleclass program, 149-50
shuffleclass2 program, 160-62, 164-65
declarations
card dealing example, 186-87, 189
data, 7
defined, 53
Visual Basic .NET syntax, 36
Delete method, ADO.NET, 293, 294
DELETE statement, SQL, 283
Design mode, Visual Studio .NET, 44-45
Design view, Web Forms Designer, 307
destructor method, 152-53
dialog box controls, 232-33, 237
DialogResult.OK, 219
Dim statements
defined, 17
shuffleclass program, 149-50
tape calculator program, 72
testing operators and expressions, 96
variable declarations, 55-57
variable scope and, 62
Visual Basic .NET reserved words and, 37
DisplayDeck subroutine, 137-38, 150, 162
DisplayHand method, 191-92
Dispose destructors, 153
DLL (dynamic link library), 172, 303
Do...Loop statements, 65-66
dockable windows, Visual Studio .NET, 33-34
DomainUpDown control, 241
double quotation marks (""), 54, 91
Double values
data conversion, 45-46
tape calculator program, 72-73
double-byte character sets, Unicode, 85
DoubleClick event, 251
DropDownStyle property, 240
Dynamic Help window, 35
dynamic link library (DLL), 172, 303
E
e argument
focus events, 249-50
keyboard events, 246, 248
early binding, 56
element variables, For...Next statements, 67
elementary data types, 53
ellipsis buttons, 205, 213-16
Else statement, 63
ElseIf statement, 63-64
EmailIsInvalid subroutine, 259
Enabled state, 187
EnableViewState property, 316
Enclosing Character, Visual Basic .NET data types, 52
End Class statement, 144-45, 186
End Function statement, 112
End Sub statement
defined, 112
function and subroutine code, 102
shuffle cards program, 135, 138
tape calculator program, 71-72
testing operators and expressions, 96
EndsWith method, 121
Enter event, 249
Enter key, 210-11
equals sign (=). See assignment operators
ErrObject functions, 121
error messages, 47-48, 58-59
ErrorProvider control, 250, 256
event handlers
ASP.NET pages, 309-10
declarative association with events, 178-79
dynamic association with events, 180
form controls and, 235, 244-45
overview of, 19-20, 178
playing cards and, 195
event loops, 20
event sender, 178
EventArgs argument, 226
events, 244-53. See also by individual names
ASP.NET pages, 309
click events, 251
declarative association with event handlers, 178-79
dynamic association with event handlers, 180
focus events, 249-50
handling, 178
keyboard events, 245-48
mouse events, 252-53
overview of, 19-20, 177-80
Web forms responding to, 314-16
exceptions
Msgbox function, 208
overview of, 157-60
Visual Basic .NET syntax, 37
exclamation point (!), 91
executable files, 6
executable statements, 7
ExecuteNonQuery method, 288
ExecuteReader method, 288-90
ExecuteScalar method, 288
Exit For statements, 67
Exit Function statement, 112
exit points, 114
Exit Sub statement, 112
expressions. See also by individual names
constant value and, 56
forming, 78-80
testing, 95-99
Extensible Markup Language (XML), 312
external help, Visual Studio .NET, 30
F
F5 (Continue), Debug menu, 98
F10 (Step Over), Debug menu, 98
F11 (Step Into), Debug menu, 98
File Open dialog box, 219, 295
FileInfo object, 266
FileStream object, 266
FileSystem functions, 121
Filter function, 133
Filter property, 223
Filtered By drop-down list, Help menu, 36
Financial functions, 121
floating-point division, 81
floating-point instructions, 4
flow layout mode, Web Forms Designer, 308
Flush method, 268
focus
events, 249-50
tab orders and, 238
Font property, 70
FontDialog class, 232
For statement, 87
For...Next statements
coding loops with, 66-68
return values, 110
Form class, 232
Form control, 232
form control events, 244-53
Click, 251
focus, 249-50
keyboard, 245-48
mouse, 252-53
form controls, 231-74. See also controls
adding and arranging, 234-35
categories, 232-33
defined, 202
hidden, 204
list boxes, 239-44
overview of, 231
properties, 204-5, 236-38
text boxes, check boxes, and radio buttons, 239
user interface design and, 203
<form> tag, 317
Form1_Load subroutine
card dealing program, 185
crocodile reporting form, 258
displaying and updating databases, 298
shuffle cards program, 135-36
shuffleclass2 program, 161
Form1.vb
card dealing program, 184-85, 196-98
crocodile reporting program, 270-74
Picture Viewer program, 227-28
shuffleclass program, 148-50
shuffleclass2 program, 160-63
Format function, 129
FormatDateTime function, 129
formats, icons, 208
forms. See Web forms; Windows forms
fourth-generation language (4GL), 6-7
Friend properties/methods, 146-47
FROM clause, SQL, 280
FrontPage, 306
functions, 101-18. See also by individual names
ADO.NET, 283
classes and, 144-45
coding, 102-3
declaring arguments, 103-4
designing, 114
exiting, 112
four-function calculator program, 114-17
overview of, 18-19, 101-2
passing arguments by reference, 106-8
passing arguments by value, 104-6
passing variable number of arguments, 108-9
return values, 109-12
variables and scope, 112-14
functions, built-in, 119-42
array functions, 132-33
date manipulation, 126-29
finding, 119-23
logical functions, 124-26
random number generation, 133-34
shuffle cards program, 135-41
string manipulation, 129-31
type conversion functions, 124
G
Games.mdb, 294-300
garbage collection, 152-53
Generate Dataset dialog box, 297
Get method, 155
GetActivity function, 267-68
GetChar function, 130-31
GetDataPresent( ) method, 225
GetOrdQty method, 154
GetType operator, 95
Globals properties, 121
GMT (Greenwich Mean Time), 126
go to, 13-14
GotFocus event, 249
Greenwich Mean Time (GMT), 126
grid layout mode, Web Forms Designer, 308
GROUP BY clause, SQL, 281
GroupBox control, 256
H
Handle property, 248
Handles keyword, 178-79
HAVING clause, SQL, 281
Height property, controls, 237
Help database, Visual Studio .NET
built-in functions, 119-23
data types, 84
FormatDateTime/Format functions, 129
methods that operate on data types, 88
.NET methods and classes, 169-71
overview of, 34-36
Picture Viewer program, 218
Help Filter drop-down list, Visual Studio .NET, 30
Hide property, form controls, 237
high-level languages, 5-7
HTML (Hypertext Markup Language), 301
HTML server controls, 311-13
HTML view, Web Forms Designer, 307-8
Hypertext Markup Language, See HTML
hyphen (-), 91
I
ICloneable interface, 170
ICO file format
form and toolbar icons, Picture Viewer, 213-16
icons, creating, 212-13
overview of, 208
ICollection interface, 170
icons
designing, 202
error, 264
MsgBox buttons property, 207
Picture Viewer, 211-16
Windows Form Designer, 205
IDE (integrated development environment), 26-27
Identity fields, SQL, 282
IEnumerable interface, 170
If statement, 63, 72-73
IIf function, 125
IIS (Internet Information Services)
administrative rights and, 304-5
ASP.NET pages and, 26
IIS Web server, 302
IList interface, 170
Image Collection Editor dialog box, 214-15
Image Editor, 212-13
Image.FromFile method, 219-20
Implements keyword, 170
Imports statement, 173
indentation, Visual Basic .NET syntax, 38
Index, keywords, 36
Index mode, Help menu, 36
informational controls, 232
inheritance, 174-75, 182
Initial Catalog setting, ADO.NET, 287
Initialize Deck subroutine
making function or subroutine part of class, 144-45
shuffleclass program, 149-51
shuffling cards program, 136-37
inner joins, 280
input fields, form validation, 259-65
INSERT command, ADO.NET, 293-294
Insert method, ListBox.Items collection, 244
INSERT statement, SQL, 281-82
instantiation, 181
InStr function, 131, 268-69
InStrRev function, 131
instruction sets, CPUs, 3-4
instructions
CPU instruction sets, 3-4
data type, 4
programs as series of, 2-3
Int( ) function, 134
int prefix, Visual Basic .NET, 36-37
intCard variable, 136-37, 139-40
intCardsInHand variable, 186
intDeck array, 136, 139
intDeck variable, 145, 149-51, 160-65
integer division, 81
integer instructions, 4
Integer reserved word, Visual Basic .NET, 37
integrated development environment (IDE), 26-27
Integrated Security setting, ADO.NET, 287
IntelliSense, Visual Studio .NET, 46-47
form control properties, 204-5
.NET methods and classes, 168
Interaction functions, 121
interactive debugging, 318
interfaces
.NET Framework and, 170
designing, 202-4
Internal Help, Visual Studio .NET, 30
Internet Explorer
as clients, 302
project display with, 317
Internet Information Services. See IIS
interval codes, DateAdd function, 128
intHand array, 186
intOrdQty method, 154
intPlayerNum variable, 186-87
IntRank variable, 136
intSuit variable, 136
intSwap variable, 139-40
intTemp variable, 139
IsDate function, 127-28
IsNumeric( ) function, 72, 93
Items collection, ListBox, 73, 243-44
J
Join function, 133
JOIN operations, 276-78
joins, types of, 280
jump, 13-14
K
keyboard events, 245-48
Keyboard Scheme drop-down list, Visual Studio .NET, 30
KeyCode property, 247-48
KeyDown event, 246-48
KeyEventArgs properties, 247
KeyPress event, 246
KeyUp event, 246-48
KeyValue property, 247-48
keywords, Index, 36. See also by individual names
L
Label controls, 255, 314
languages, programming, 5-7
late binding, 56
layered software, 7-9
layout modes, Web Forms Designer, 308-9
lblPlayer label, 186-87
lblTotal control, 70-74
LBound statement, 132-33
Leave event, 249
left bracket ([), 91
Left function, 130
left joins, 280
Lens function, 110
Like operators, 90-91
line of code, 6-7
list boxes, 239-44
adding/removing ListBox entries, 243-44
advantages of, 239-40
card dealing program, 186
Items collection of, 73-74
multiple-selection, 242-43
single-selection, 241-42
types of, 240-41
ListBox control, 240
ListBox.Items collection, 243-44
literals, 53-54, 314
Load Last Loaded Solution, Visual Studio .NET, 31
Local Settings folder, 269
locale settings, 90
Location property, 258, 261
logical functions, 124-26
logical operators, 92-94
loop structures
defined, 51
overview of, 12-15
structured programming and, 10
writing, 65-68
LostFocus event, 249
LTrim function, 130
M
machine instructions, 2-3
machine language, 5, 6
main menu, Picture Viewer, 210-11
mainline, top-down design and, 15-16
margins, displaying, 221-23
Math.Abs method, 82
Me keyword, 141, 182
memory
arrays and, 61
code and data occupying, 2-4
declarations and, 36
high-level languages and, 7
variables and, 56, 86
menu bars, 202-3
message boxes, 218
Message property, 158
MessageBox class, 233
methods, 144-45. See also by individual names within classes
data type searches and, 88
defined, 20, 101
finding .NET, 168-71
overloading and polymorphism and, 175-77
overview of, 121
shared, 171
SqlCommand/OleDbCommand, 288
Microsoft Developer Network library. See MSDN library
Microsoft Internet Information Services (IIS). See IIS
Microsoft Jet 4.0 OLE DB Provider, 295
Microsoft .NET Framework. See .NET Framework
Microsoft Visual Basic .NET. See Visual Basic .NET
Microsoft Visual Studio .NET. See Visual Studio .NET
Microsoft Windows. See Windows OS versions
Mid function, 130-31
Minus icon, Windows Form Designer, 205
MkDir subroutine, 102
mnuEditCopy_Click subroutine, 224
mnuEditPaste_Click subroutine, 225
mnuFileExit_Click subroutine, 218
mnuFileOpen_Click subroutine, 219-20
mnuHelpAbout_Click, 218
Mod operator, 81
Modifiers property, keyboard events, 248
modular design, 15-16
modules, 19, 183, 189
Month function, 129
mouse events, 252-53
MouseDown event handler, 253
MouseEnter event, 252
MouseEventArgs argument, 252-53
MouseLeave event, 252
MouseMove event, 252
Move events, 189
MSDN (Microsoft Developer Network) library
event handlers, 245
exceptions and, 158
keyboard events, 247
mouse buttons, 252
.NET methods and classes, 169-71
overview of, 34-35
Windows forms, 182
MsgBox( ) function, 73, 96-97, 206-8
MsgBoxSetForeground setting, MsgBox, 207
MyBase keyword, 189
N
Name properties, 70, 260-61
namespaces
form controls and, 232-33
importing, 173
.NET methods and classes, 169-71
referencing, 172
naming conventions
applications, 41
constants, 56
form controls, 234-35
functions and subroutines, 103
variables, 17, 54
narrowing conversions, 84
.NET Framework, 168-73
ASP.NET component of, 301
CLR layer and, 8-9
Date functions, 127
interfaces, 170
methods and classes, 168-71
namespaces, 172, 173
Web programming with, 302
Windows applications, 24-25
.NET Framework Redistributable, 24-25
.NET Framework Software Development Kit (SDK)
data type methods and, 88
downloading and installing, 26
Web applications, 304
Windows applications, 24
Netscape Navigator, 302
New Icon Image Type dialog box, 213
New keyword, 147
New Project dialog box
One-Button Calculator program, 50
tape calculator program, 69
testing operators and expressions, 95
nonprocedural languages, 6
Not operators, 94-95
NotifyIcon control, 232
Now( ) function, 56-57
numbers
comparing, 88-89
computers counting and, 3
random, 134-42
NumericUpDown control, 241, 256, 262
O
Object class, 174
object files, 6
object-oriented programming (OOP), 20-21
objects, 143-66. See also by individual names
ADO.NET, 283
class, 144
classes, writing, 144, 147-48
constructor method, 151-52
destructor method, 152-53
exceptions and, 157-60
methods within classes, 144-45
overview of, 20-21, 143-44
properties, 153-56
scope, 146-47
shuffleclass program, 148-51
shuffleclass2 program, 160-65
structures and, 156-57
OleDb objects, 284
OleDbCommand object, 287-88, 290
OleDbConnection, 284-86
One-Button Calculator form, 40-48
OOP (object-oriented programming), 20-21
Open.bmp, Picture Viewer icons, 211-13
OpenFileDialog control, 232, 237
operands, 78
operating system (OS) layer, 8-9
operators, 78-99. See also by individual names
AddressOf, 95
arithmetic, 80-82
assignment, 82-88
bitwise, 94-95
comparison, 88-91
concatenation, 92
defined, 19
expressions and, 78-80
GetType, 95
logical, 92-94
overview of, 78
precedence in Visual Basic .NET, 80
testing, 95-99
option buttons, 203
Option Compare settings, 89-90
Option Explicit, 58-60
Option Strict
constant declaration and, 57
numeric type conversions and, 84
overview of, 59-60
Optional keyword, 108
Options Page dialog box, Visual Basic .NET, 28
Or operator, 94-95
ORDER BY clause, SQL, 281
OrElse operator, 94
OS (operating system) layer, 8-9
output file, crocodile form, 265-69
overflow, 85
overloading, 175-77
P
Page_Load event, 314-15
Page.IsPostBack property, 315
PageSetUpDialog class, 232
parameters
connection string, 286
MsgBox function, 206-8
Partition function, 125
Password setting, 287
Paste.bmp, Picture Viewer icons, 211-13
pasting form controls, 234
PictureBox control, 203-5
Picture.ico, 213-16
Picture Viewer example, 209-29
assembly information, 216-18
copying picture to/from clipboard, 224-25
file display, 219-24
file exit, 218-19
form and toolbar icons, 213-16
form creation, 209-11
Form1.vb, 227-29
help regarding events, 218-19
icon creation, 211-13
toolbar buttons, 225-26
Picture Viewer icons, creating and configuring, 211-216
picview project. See Picture Viewer example
Picview Property Pages dialog box, 213-16
PlayCard event, 193
Player form, 192-96
Player table, 294-300
Player.vb, 185-88, 199-200
Plus icon, Windows Form Designer, 205
plus operators (+), 92
pointers, 85
polymorphism, 175-77
Position property, controls, 236
positional arguments, 103
pound sign (#), 280
prefixes
argument declarations, 103
argument identification, 17
variable naming conventions, 55
PrepareText function, 267
PrepareText subroutine, 268-69
Preserve keyword, 61
PrintDialog class, 232
printing, from Windows-based applications, 232-33
PrintPreviewDialog class, 232
Private access
overview of, 146-47
property procedures, 153-56
shuffleclass2 program, 160
Private Sub btnClear_Click statement, 71-72, 96
procedural languages, 6
Profile drop-down list, Visual Studio .NET, 29
programming. See also by individual examples
bottom-up design, 16-17
classes and objects, 20-21
data types, 4-5
events, 19-20
functions, 17-19
languages, 5-7
layered software for, 7-9
memory and, 2-4
structured, 9-15
subroutines and, 17-19
top-down design, 15-17
PROJECT operations, 276-77
project, Visual Basic, 31
Prompt parameter, MsgBox, 206
properties. See also by individual names
application creation and, 41-42
card dealing program, 184, 185
classes and, 145
defined, 20
exception objects and, 158-59
form controls, 204-6, 236-38
forms, 42-43, 182, 204-6
KeyEventArgs, 247
MouseEventArgs, 252-53
overview of, 121
Players table, 294
polymorphism and, 176-77
scope and, 146-47
SqlCommand/OleDbCommand, 287-88
Property Pages dialog box, 173
property procedures, 153-56, 160-65
PropertyGrid control, 233
Provider setting, ADO.NET connection string, 286
Public access
constructor methods as, 151
overview of, 146-47
property procedures and, 153-56
shuffleclass program, 149-50
Q
Query Builder window, 296
R
radio buttons
CheckedChanged event and, 251
crocodile reporting form, 256, 257
defined, 203
validating, 262-63
working with, 239
RaiseEvent statement, 177-78
RAM (Random Access Memory), 2, 26
random numbers, 133-34
Randomize( ) statement
commenting, 142
overview of, 134
shuffling cards, 139
Rank property procedure, 161-65
Read method, data readers, 290
ReadOnly property procedure, 156, 161-65
ReDim statement, 61-62, 87
reference types, 84
reference variables, 85-88
Regional and Language options, Control Panel, 90
Remove method
ADO.NET, 293
form controls, 235
ListBox Items collection, 244
RemoveAt method, ListBox Items collection, 244
RemoveHandler statement, 180, 196
Replace function, 131, 269
requirements, ASP.NET Web applications, 26, 304
reserved words, Visual Basic .NET, 37
result set, 278
Return statement, 111
right bracket (]), 91
Right function, 130
right joins, 280
Rnd( ) function, 133-34, 140
RTrim function, 130
rules
data types for literals, 54
naming constants, 56
variable names, 54
run mode, Visual Studio .NET, 44
run-time binding, 56
S
S icon, 171
SaveFileDialog class, 232
scope
defined, 18
functions and subroutines and, 112-14
objects and, 146-47
of variables, 62
SDK (Software Development Kit). See .NET Framework Software Development Kit (SDK)
Search mode, Help menu, 36
second generation languages, 6-7
Select Case statement, 64, 188
SELECT clause, SQL, 278-79
SELECT operations, 276-77
SelectedIndex property, list boxes, 194, 241-42
SelectedIndexChanged event, 251
SelectedIndices property, list boxes, 242
SelectedItems property, list boxes, 242, 243
SelectionMode property, list boxes, 241, 242-43
sequence structures, 9
server controls
content properties, 316
defined, 309
HTML, 311-13
Web, 313-14
Web forms and, 311
XML syntax and, 312
Server Explorer window, 285
Set method, 155
SetItemCheckState( ) method, 243
SetOrdQty method, 154
SetSelected( ) method, list boxes, 243
Setup dialog box, Visual Basic .NET, 28-29
shared methods, 171
Shift+F11 (Step Out), Debug menu, 98
Show Empty Environment, Visual Studio .NET, 31-32
Show Hidden Files and Folders option, 269
Show New Project Dialog Box, Visual Studio .NET, 31
Show Open Project Dialog Box, Visual Studio .NET, 31
Show property, form controls, 237
Show Start Page, Visual Studio .NET, 31, 33-34
ShowDialog method, 237
shuffle cards example
initializing deck, 134-38
shuffling cards, 138-42
shuffleclass example, 148-51
shuffleclass2 example, 160-65
ShuffleDeck subroutine, 135-40, 149-50
signature, 176
single-file, Web forms, 303
Size property, controls, 236-37
Software Development Kit (SDK). See .NET Framework Software Development Kit (SDK)
software, layered, 7-9
Solution Explorer
namespaces, 172, 173
project display, 317
project forms, 180-83
startup objects, 174
Web forms, 305-6
solution, Visual Basic .NET, 31
source code, 6
source statements, 6
space characters, SQL statements, 279
spaghetti code, 9
specification-oriented language, 6
Split function, 133
Sql prefix objects, 283-4, 286
SQL (Structured Query Language), 278-83
DELETE statements, 283
FROM and WHERE clauses, 280
GROUP BY, HAVING, and ORDER BY clauses, 281
INSERT statements, 281-82
overview of, 278
SELECT statements, 278-79
UPDATE statements, 282
SqlCommand object, 283-4
SqlConnection object, 283-84
Start page, Visual Studio .NET, 29
statements, 51-76. See also by individual names
arrays and, 60-62
constants and, 56-57
data types and, 52-53
decision, 63-64
literals and, 53-54
loop, 65-68
Option Explicit and Option Strict, 58-60
tape calculator program, 68-75
variable scope and, 62-63
variables and, 54-56
statements, elementary
defined, 6
two or more on one line, 38
types of, 7
Visual Basic .NET syntax and, 36
StatusBar control, 223, 256
strDeck variable, 137-38
streams, 255
StreamWriter object, 266-67
String Collection Editor window, 257
String functions
built-in functions, 129-31
comparing, 89-90
data types, 54
instructions, 4
reference types, 85-86
VBMath functions, 121
structured programming, 9-15
Structured Query Language. See SQL (Structured Query Language)
structures, declaring, 156-57
stub, 75
Sub DisplayDeck statement, 137
Sub InitializeDeck statement, 136
Sub New statement, 151
Sub statement, 102
subcommands, 202
subroutines. See also by individual names
argument declaration and, 103-4
class and, 144-45
coding, 102-3
defined, 102
designing, 114
event handlers and, 178-79
exiting, 112
four-function calculator program, 114-17
overview of, 17-19, 101-2
passing arguments by reference, 106-8
passing arguments by value, 104-6
passing variable number of arguments, 108-9
return values, 109-12
tape calculator program, 75
variables and scope and, 112-14
subscript, 60
Subtract button, 74
Suit property procedure, 162
Switch function, 126
swtOut stream writer, 267
syntax
Visual Basic .NET, 36-39
XML (Extensible Markup Language), 312
System.Drawing.Printing namespace, 233
System.IndexOutOfRange exception, 60
System.IO namespace, 255
SystemModal setting, Msgbox, 207
System.Windows.Forms namespace, 232-33
T
Tab key, 238
TabIndex property, 238, 257
tabs, manipulating Visual Studio.NET windows, 34
TakeCard method, 190-91
tape calculator example, 68-75
controls, 70
developing with Visual Studio .NET, 69-74
Dim and If statements, 72-73
features of, 68-69
running the program, 74
testing
operators and expressions, 95-99
Web forms, 317-19
text boxes
crocodile reporting form, 255-56
TextChanged event and, 251
working with, 239
Text property
list boxes, 242
One-Button Calculator form, 41-42, 45
shuffle cards program, 135
tape calculator program, 69-70
testing operators and expressions, 95
TextAlign property, 70
TextBox control, 42-43
TextChanged event, 251
third-generation language (3GL), 6-7
TimeSerial function, 128
TimeValue function, 129
Title parameter, Msgbox, 206
ToolBar1_ButtonClick subroutine, 226
ToolBarButton Collection Editor dialog box, 215-16
toolbars
Picture Viewer buttons, 225-26
Picture Viewer icons, 214-16
user interface design, 202-3
Toolbox
crocodile reporting form, 255
form controls, arranging and adding, 234-36
form controls in, 233
top-down design, 15-17
ToString method, 176
Try...Catch...End Try block, 157-60, 220
txtEmail control, 259-60
txtTotal TextBox, 43, 45-48
Type, Visual Basic.NET data types, 52
type conversion functions, 124
Typical Values, Visual Basic .NET data types, 52
U
UBound function, 87, 132
UCase function, 102, 110
underscore (_)
applying, 18
coding comments after, 39
as continuation character, 38
variable naming conventions, 54-55
Unicode character set, 85
Update method, ADO.NET, 293-94, 299
UPDATE statement, SQL, 282
User ID setting, 287
user interfaces. See interfaces
UTC (Coordinated Universal Time), 126
V
Validated event, 249-50, 259-65
values. See also by individual names
passing arguments by, 104-6
specifying return, 109-12
types of, 84
variables. See also by individual name
applying, 54-56
defined, 51
errors in code and, 58-59
naming, 17, 54-55
properties, 145
reference, 85-88
scope of, 18, 62-63
VBMath functions, 121
Visible property, form controls, 237, 313
Visual Basic .NET, 23-49
easing into, 29-32
Help database, 34-36
history of, 2
installing, 27-29
keywords, Index, 36
obtaining, 26-27
overview of, 23-24
power and ease of, 2
running in .NET Framework, 9
syntax, 36-39
system preparation for, 24-26
window manipulation, 33-34
writing and running first program, 39-48
Visual Studio .NET
application creation, 40-44
application display, 305-7
date evaluator example, 319-21
Help database, 34-36
as IDE for Visual Basic .NET, 27
Image Editor, 212-13
.NET methods and classes, 168-71
starting Visual Basic .NET with, 29-32
Web forms and, 303
Web Forms Designer, 311
Web project creation, 303-5
window manipulation, 33-34
Windows Form Designer, 203
W
Web
introduction to, 302-3
.NET applications and, 25-26
Web browsers
as clients, 302
Web layout modes and, 308
Web forms, 301-24
ASP.NET and, 302
compared with Windows forms, 303
controls, adding to, 311
creating, 303-5
data exchange, 316-17
date evaluator example, 319-23
designing, 307-9
event response with, 314-16
HTML server controls, 311-13
life cycle of, 309-10
parts of, 303
single-file, 303
testing, 317-19
viewing new, 305-7
Web server controls and, 313-14
Web Forms Designer
layout modes, 308
menu choices, 311
views, 307-8
Web server controls, 313-14
Web servers, 302
Web sites, information resources
MSDN library, 35
.NET Framework Redistributable, 25
.NET methods and classes, 169-71
WHERE clause, SQL, 280, 282
While keyword, 66
While loops, 68
While...End While statements, 68
widening conversions, 84-85
Width property, Windows forms, 222, 237
Window Layout drop-down list, Visual Studio .NET, 30
Windows 2000. See Windows OS versions
Windows Component Update, 27-28
Windows Form Designer
form control errors, 250
form controls, 234-36
form display, 203-4
properties, setting, 204-6
Windows forms, 201-29. See also Picture Viewer example
adding TextBoxes to, 42-43
adding to projects, 180-89
compared with Web forms, 303
icons, finding and creating, 208
message boxes, 206-8
properties, setting, 204-5
renaming when creating application, 41-42
user interfaces, designing, 202-4
Windows OS versions. See also Windows forms
event handlers, 19-20
preparing for .NET Web applications, 25-26
preparing for .NET Windows applications, 24-25, 41
WithEvents keyword, 178-79
WriteLine method, stream writer, 267
WriteOnly property procedure, 156
WriteOutput subroutine, 265-69
X
XML (Extensible Markup Language), 312
Xor operators, 94-95
Z
ZapFirst subroutine, 105-6
ZeroOut subroutine, 104-5
Last Updated: October 29, 2002
|