- Page 1 and 2: Computer Programming Concepts and V
- Page 3 and 4: CONTENTS SECTION 1: PROBLEM SOLVING
- Page 5: 13.3 WEB PAGE PROGRAMMING WITH VBSC
- Page 9: S E C T I O N 1 PROBLEM SOLVING
- Page 12 and 13: 4 Computer Programming Concepts and
- Page 14 and 15: 6 Computer Programming Concepts and
- Page 16 and 17: 8 Computer Programming Concepts and
- Page 18 and 19: 10 Computer Programming Concepts an
- Page 20 and 21: 12 Computer Programming Concepts an
- Page 23: S E C T I O N 2 FUNDAMENTALS OF PRO
- Page 27 and 28: A TEXT BOX WALKTHROUGH 1. Double-cl
- Page 29 and 30: FIGURE 2-6 Setting the ForeColor Pr
- Page 31 and 32: 26. Click the Save button when you
- Page 33 and 34: 2. Double-click on the picture box
- Page 35 and 36: ground color and caption. Setting t
- Page 37 and 38: Object box 1. Create the interface
- Page 39 and 40: FIGURE 2-18 A GotFocus Event Proced
- Page 41 and 42: 14. Click on the text box or press
- Page 43 and 44: ■ ARITHMETIC OPERATIONS The five
- Page 45 and 46: ■ VARIABLES In applied mathematic
- Page 47 and 48: Notice that the negative number -3
- Page 49 and 50: to the file by the filespec “C:\D
- Page 51 and 52: EXAMPLE 2 The following program ill
- Page 53 and 54: ■ USING TEXT BOXES FOR INPUT AND
- Page 55 and 56: Object Property Setting frm3_4_7 Ca
- Page 57 and 58: 14. Variable names should describe
- Page 59 and 60: EXAMPLE 2 The following program use
- Page 61 and 62: EXAMPLE 4 In the following solution
- Page 63 and 64: picTable.Print “Female”; Tab(10
- Page 65 and 66: Some of the benefits of documentati
- Page 67 and 68: EXAMPLE 1 The following program eva
- Page 69 and 70: Like the numeric functions discusse
- Page 71 and 72: EXAMPLE 7 The following program pro
- Page 73 and 74: EXAMPLE 8 The DC Lottery number is
- Page 75 and 76:
SUMMARY 1. The Visual Basic screen
- Page 77 and 78:
The Jones family has been selected
- Page 79:
S E C T I O N 3 GENERAL PROCEDURES
- Page 82 and 83:
74 Computer Programming Concepts an
- Page 84 and 85:
76 Computer Programming Concepts an
- Page 86 and 87:
78 Computer Programming Concepts an
- Page 88 and 89:
80 Computer Programming Concepts an
- Page 90 and 91:
82 Computer Programming Concepts an
- Page 92 and 93:
84 Computer Programming Concepts an
- Page 94 and 95:
86 Computer Programming Concepts an
- Page 96 and 97:
88 Computer Programming Concepts an
- Page 98 and 99:
90 Computer Programming Concepts an
- Page 100 and 101:
92 Computer Programming Concepts an
- Page 102 and 103:
94 Computer Programming Concepts an
- Page 104 and 105:
96 Computer Programming Concepts an
- Page 106 and 107:
98 Computer Programming Concepts an
- Page 109:
S E C T I O N 4 DECISIONS
- Page 112 and 113:
104 Computer Programming Concepts a
- Page 114 and 115:
106 Computer Programming Concepts a
- Page 116 and 117:
108 Computer Programming Concepts a
- Page 118 and 119:
110 Computer Programming Concepts a
- Page 120 and 121:
112 Computer Programming Concepts a
- Page 122 and 123:
114 Computer Programming Concepts a
- Page 124 and 125:
116 Computer Programming Concepts a
- Page 126 and 127:
118 Computer Programming Concepts a
- Page 128 and 129:
120 Computer Programming Concepts a
- Page 130 and 131:
122 Computer Programming Concepts a
- Page 132 and 133:
124 Computer Programming Concepts a
- Page 134 and 135:
126 Computer Programming Concepts a
- Page 136 and 137:
128 Computer Programming Concepts a
- Page 139 and 140:
5.1 DO LOOPS A loop, one of the mos
- Page 141 and 142:
Note: If a file other than SECRET.T
- Page 143 and 144:
Private Sub cmdButton_Click() Dim n
- Page 145 and 146:
Do While there are still data in th
- Page 147 and 148:
■ FLAGS A flag is a variable that
- Page 149 and 150:
Similarly, the statements Do While
- Page 151 and 152:
Private Sub cmdDisplay_Click() Dim
- Page 153 and 154:
The body of a For...Next loop can c
- Page 155 and 156:
correct payment = Round(payment + .
- Page 157 and 158:
picDisp FIGURE 5-8 Monthly Payment
- Page 159 and 160:
Call InputData(principal, yearlyRat
- Page 161 and 162:
Dim yrs As String, pay As Single, p
- Page 163 and 164:
togram of 1994 levels, respectively
- Page 165:
7. Depreciation to a Salvage Value
- Page 169 and 170:
6.1 CREATING AND ACCESSING ARRAYS A
- Page 171 and 172:
sets aside a portion of memory for
- Page 173 and 174:
End Sub [Run, type White Sox into t
- Page 175 and 176:
’Determine amount of data to be p
- Page 177 and 178:
The range of an array need not just
- Page 179 and 180:
3. The two arrays in Example 3 are
- Page 181 and 182:
FIGURE 6-5 Flowchart for a Search o
- Page 183 and 184:
Private Sub cmdMerge_Click() Dim m
- Page 185 and 186:
Sometimes it is also necessary to p
- Page 187 and 188:
num(5) = 10 picOutput.Print Triple(
- Page 189 and 190:
sales = 0 For depNum = 0 To 4 sales
- Page 191 and 192:
If controlName is the name of a con
- Page 193 and 194:
■ BUBBLE SORT The bubble sort is
- Page 195 and 196:
Houston 3.7 $31,488 67 8 Los Angele
- Page 197 and 198:
The Shell sort is illustrated in wh
- Page 199 and 200:
Open “SHOEPART.TXT” For Input A
- Page 201 and 202:
EXAMPLE 5 In the following program
- Page 203 and 204:
last = middle - 1 Case Is < searchC
- Page 205 and 206:
dimensions an array of type varType
- Page 207 and 208:
SOLUTION: Coding is simplified by u
- Page 209 and 210:
■ THE DESIGN OF THE PROGRAM Figur
- Page 211 and 212:
Index 1 lblColLab() Caption A Index
- Page 213 and 214:
Dim maxCol As Integer ‘Number of
- Page 215 and 216:
txtCell(Indx(10, 1)).Text = “Food
- Page 217 and 218:
ow = incStartRow ElseIf (row > incS
- Page 219 and 220:
3. Rudimentary Translator. Table 6.
- Page 221:
Section 6 Programming Projects 213
- Page 225 and 226:
7.1 SEQUENTIAL FILES Throughout thi
- Page 227 and 228:
4. After all the data have been rec
- Page 229 and 230:
Write #2, nom, yob Else foundFlag =
- Page 231 and 232:
(a) Often a large portion of the fi
- Page 233 and 234:
Close #1 End Sub [Run, and then cli
- Page 235 and 236:
■ CONTROL BREAK PROCESSING Suppos
- Page 237 and 238:
and reporting balances—have becom
- Page 239 and 240:
to the SetupCheck Sub procedure, wh
- Page 241 and 242:
Dim message As String ‘If one of
- Page 243 and 244:
A Case Study: Recording Checks and
- Page 245 and 246:
cmdRecord.Caption = “&Record This
- Page 247 and 248:
(e) Print out the names and phone n
- Page 249:
Note: The first array must be searc
- Page 253 and 254:
8.1 USER-DEFINED DATA TYPES Records
- Page 255 and 256:
■ RECORDS In this text, we have w
- Page 257 and 258:
EXAMPLE 3 The following program pro
- Page 259 and 260:
3. Statements of the form picBox.Pr
- Page 261 and 262:
The two-step procedure for reading
- Page 263:
SUMMARY 1. A fixed-length string is
- Page 267 and 268:
9.1 INTRODUCTION TO GRAPHICS Visual
- Page 269 and 270:
(c) The point (-2, 0) is the left-h
- Page 271 and 272:
picOutput.Scale (-2, 12)-(12, -2)
- Page 273 and 274:
the picture box. The TextWidth meth
- Page 275 and 276:
9.2 LINE CHARTS A line chart displa
- Page 277 and 278:
Private Sub ShowTitle() ‘Display
- Page 279 and 280:
picEnroll.Line (i, female(i))-(i +
- Page 281 and 282:
placed before the Scale method is e
- Page 283 and 284:
Private Sub DrawData(male() As Sing
- Page 285 and 286:
9.4 PIE CHARTS Drawing pie charts r
- Page 287 and 288:
EXAMPLE 3 Write a program to draw t
- Page 289 and 290:
‘space of 1.75 radii will remain
- Page 291 and 292:
2. Figure 9-24 is called a horizont
- Page 293:
S E C T I O N 10 ADDITIONAL CONTROL
- Page 296 and 297:
288 Computer Programming Concepts a
- Page 298 and 299:
290 Computer Programming Concepts a
- Page 300 and 301:
292 Computer Programming Concepts a
- Page 302 and 303:
294 Computer Programming Concepts a
- Page 304 and 305:
296 Computer Programming Concepts a
- Page 306 and 307:
298 Computer Programming Concepts a
- Page 308 and 309:
300 Computer Programming Concepts a
- Page 310 and 311:
302 Computer Programming Concepts a
- Page 312 and 313:
304 Computer Programming Concepts a
- Page 314 and 315:
306 Computer Programming Concepts a
- Page 316 and 317:
308 Computer Programming Concepts a
- Page 318 and 319:
310 Computer Programming Concepts a
- Page 320 and 321:
312 Computer Programming Concepts a
- Page 322 and 323:
314 Computer Programming Concepts a
- Page 324 and 325:
316 Computer Programming Concepts a
- Page 326 and 327:
318 Computer Programming Concepts a
- Page 329:
S E C T I O N 11 DATABASE MANAGEMEN
- Page 332 and 333:
324 Computer Programming Concepts a
- Page 334 and 335:
326 Computer Programming Concepts a
- Page 336 and 337:
328 Computer Programming Concepts a
- Page 338 and 339:
330 Computer Programming Concepts a
- Page 340 and 341:
332 Computer Programming Concepts a
- Page 342 and 343:
334 Computer Programming Concepts a
- Page 344 and 345:
336 Computer Programming Concepts a
- Page 346 and 347:
338 Computer Programming Concepts a
- Page 348 and 349:
340 Computer Programming Concepts a
- Page 350 and 351:
342 Computer Programming Concepts a
- Page 352 and 353:
344 Computer Programming Concepts a
- Page 354 and 355:
346 Computer Programming Concepts a
- Page 356 and 357:
348 Computer Programming Concepts a
- Page 358 and 359:
350 Computer Programming Concepts a
- Page 361:
S E C T I O N 12 OBJECT-ORIENTED PR
- Page 364 and 365:
356 Computer Programming Concepts a
- Page 366 and 367:
358 Computer Programming Concepts a
- Page 368 and 369:
360 Computer Programming Concepts a
- Page 370 and 371:
362 Computer Programming Concepts a
- Page 372 and 373:
364 Computer Programming Concepts a
- Page 374 and 375:
366 Computer Programming Concepts a
- Page 376 and 377:
368 Computer Programming Concepts a
- Page 378 and 379:
370 Computer Programming Concepts a
- Page 380 and 381:
372 Computer Programming Concepts a
- Page 382 and 383:
374 Computer Programming Concepts a
- Page 384 and 385:
376 Computer Programming Concepts a
- Page 386 and 387:
378 Computer Programming Concepts a
- Page 388 and 389:
380 Computer Programming Concepts a
- Page 390 and 391:
382 Computer Programming Concepts a
- Page 393 and 394:
13.1 OLE OLE, which stands for Obje
- Page 395 and 396:
Dim objExcel As Object ‘In (Decla
- Page 397 and 398:
FIGURE 13-2 Dialog Box for Insertin
- Page 399 and 400:
Notice that the document in the OLE
- Page 401 and 402:
To access an initial Web page, you
- Page 403 and 404:
EXAMPLE 2 The following enhancement
- Page 405 and 406:
DownloadComplete Triggered when the
- Page 407 and 408:
FIGURE 13-5 Web Page ■ PLACING AC
- Page 409 and 410:
FIGURE 13-7 14. Feel free to type i
- Page 411:
SUMMARY 1. OLE, a technology develo
- Page 415 and 416:
APPENDIX A ANSI VALUES ANSIValue Ch
- Page 417 and 418:
APPENDIX B HOW TO HOW TO: INSTALL,
- Page 419 and 420:
4. If you selected Recent, double-c
- Page 421 and 422:
3. Press F1. C. Display an ANSI tab
- Page 423 and 424:
2. Point to Programs. 3. Point to A
- Page 425 and 426:
1. Press F4. or 1. Click on an obje
- Page 427 and 428:
3. Click on the down arrow at the r
- Page 429:
B. Remove all breakpoints. 1. Press
- Page 432 and 433:
424 Computer Programming Concepts a
- Page 434 and 435:
426 Computer Programming Concepts a
- Page 436 and 437:
428 Computer Programming Concepts a
- Page 438 and 439:
430 Computer Programming Concepts a
- Page 440 and 441:
432 Computer Programming Concepts a
- Page 442 and 443:
434 Computer Programming Concepts a
- Page 444 and 445:
436 Computer Programming Concepts a
- Page 446 and 447:
438 Computer Programming Concepts a
- Page 448 and 449:
440 Computer Programming Concepts a
- Page 450 and 451:
442 Computer Programming Concepts a
- Page 452 and 453:
444 Computer Programming Concepts a
- Page 454 and 455:
446 Computer Programming Concepts a
- Page 456 and 457:
448 Computer Programming Concepts a
- Page 458 and 459:
450 Computer Programming Concepts a
- Page 460 and 461:
452 Computer Programming Concepts a
- Page 462 and 463:
454 Computer Programming Concepts a
- Page 464 and 465:
456 Computer Programming Concepts a
- Page 466 and 467:
APPENDIX D VISUAL BASIC DEBUGGING T
- Page 468 and 469:
can then alter the expression in th
- Page 470 and 471:
point. (Pressing F9 is referred to
- Page 472 and 473:
2. Press F8, click the command butt
- Page 474 and 475:
I N D E X A Access key, 24, 296-297
- Page 476 and 477:
I If block, 106-112, 114, 119, 126,
- Page 478 and 479:
END-USER LICENSE AGREEMENT FOR MICR
- Page 480 and 481:
MISCELLANEOUS If you acquired this