Cover image for Learn to Program with Visual Basic 6
Title:
Learn to Program with Visual Basic 6
Author:
Smiley, John.
Personal Author:
Publication Information:
Birmingham, UK : Acitve Path Ltd., [1998]

©1998
Physical Description:
777 pages : illustrations ; 24 cm + 1 computer laser optical disc (4 3/4 in.)
General Note:
CD accompanies book.
Language:
English
Title Subject:
ISBN:
9781902745008
Format :
Book

Available:*

Library
Call Number
Material Type
Home Location
Status
Central Library QA76.73.B3 S57 1998 Book and Software Set Central Closed Stacks
Searching...

On Order

Summary

Summary

A guide to the programming language for absolute beginners explores the theory, practice, and applications of Visual Basic 6.


Table of Contents

Introductionp. 1
Who is This Book For?p. 1
What Will You Need?p. 1
What is Covered?p. 2
How is the Book Structured?p. 2
What is 'Learn to Program'?p. 2
Do I Get Any Support?p. 3
What is Active Path?p. 3
What About Text Styles?p. 3
How to Install Visual Basicp. 5
Chapter 1 Where Do I Begin?p. 7
Programming the Easy Wayp. 8
Planning a Program is Like Planning a Housep. 9
We Receive a Call from the China Shopp. 11
We Meet with Our Clientp. 12
The Systems Development Life Cycle (SDLC)p. 21
Phase 1 The Preliminary Investigationp. 24
Phase 2 Analysisp. 25
Phase 3 Designp. 30
Output Designp. 32
Input Designp. 34
Choosing the Brandp. 34
Choosing the Itemsp. 36
Quantityp. 38
The First Screen Designp. 39
The Requirements Statementp. 43
Processing Designp. 47
Looking at Processing in Detailp. 47
Back to the Bullina China Shopp. 50
Phase 4 Developmentp. 59
Phase 5 Implementationp. 60
Phase 6 Audit and Maintenancep. 61
Where To From Here?p. 62
Summaryp. 62
Quizp. 64
Chapter 2 What is a Computer Program?p. 67
What is a Computer?p. 67
Datap. 68
Bitsp. 69
Bytesp. 70
Memoryp. 71
Computer Storagep. 74
RAM vs. Storagep. 76
What Makes a Computer Program Run?p. 77
A Little Computer Historyp. 80
DOSp. 80
Booting DOSp. 80
RAM Usage in DOSp. 84
Registersp. 86
The Stackp. 86
Problems with DOSp. 87
Microsoft Windowsp. 89
The Title Barp. 93
The Menu Barp. 95
Windows Behaviorp. 95
A More In-Depth Look at Windowsp. 98
Virtual Memoryp. 98
Multitaskingp. 101
Non-Preemptive Multitaskingp. 101
Pre-emptive Multitaskingp. 102
Running Programs in Windowsp. 102
Preparing the Windows Program to Runp. 103
1 Windows Creates a New Process and an Initial Thread for the Programp. 103
2 The Application Program Code is Loaded into RAM, just as it is in a DOS Programp. 104
3 If the Application uses any Dynamic Link Libraries, they are also Loaded into RAMp. 105
4 Space for Items such as Data and Stacks is Allocated in RAMp. 107
5 The Application Program Begins to Executep. 107
Running the Windows Programp. 107
The Windows Handlep. 110
Windows Messagesp. 110
The Focusp. 112
Summaryp. 114
Quizp. 116
Chapter 3 Getting Comfortable with Visual Basicp. 119
Preparing the Way for Programmingp. 120
Let's Start Up Visual Basic!p. 124
The Visual Basic Projectp. 126
The IDEp. 127
The Modes of Visual Basicp. 128
The Visual Basic Menup. 129
The File Menup. 129
The Print Menup. 130
The Edit Menup. 131
The View Menup. 134
Objects and the Object Browserp. 137
Organizing the Projectp. 137
Altering the IDEp. 138
Finishing the View Menup. 138
The Project Menup. 140
Project Propertiesp. 140
The General Tabp. 141
The Format Menup. 142
The Format Menup. 143
Alignp. 143
Make Same Sizep. 145
Size to Gridp. 146
Horizontal Spacingp. 146
Vertical Spacingp. 147
Center In Formp. 147
Orderp. 147
Lock Controlsp. 148
The Debug Menup. 148
The Run Menup. 148
The Tools Menup. 150
Optionsp. 150
The Editor Tabp. 151
The Editor Format Tabp. 153
The General Tabp. 154
The Docking Tabp. 156
The Environment Tabp. 157
The Advanced Tabp. 158
The Add-Ins Menup. 159
The Window Menup. 160
The Help Menup. 160
The Visual Basic Toolbarp. 160
The Visual Basic Toolboxp. 161
The Properties Windowp. 163
The Project Windowp. 163
Summaryp. 165
Quizp. 166
Chapter 4 Programming is Easy!p. 169
Visual Basic Properties, Methods and Eventsp. 170
Visual Basic Propertiesp. 171
Running the China Shop Project for the First Timep. 189
Properties of the Formp. 192
The Name Propertyp. 193
Naming Conventionsp. 193
The Height and Width Propertiesp. 194
The BorderStyle, ControlBox, Moveable Propertiesp. 195
The StartupPosition Propertyp. 196
The Caption Propertyp. 196
Visual Basic Methodsp. 198
Visual Basic Eventsp. 199
Summaryp. 203
Quizp. 205
Chapter 5 Building the User Interfacep. 207
John Smiley's 10-step Guide to Successful Interface Developmentp. 208
The Visual Basic ToolBoxp. 209
The China Shop Controlsp. 211
Overviewp. 211
The Frame Controlp. 214
The List Box Controlp. 218
The Label Controlp. 220
The Command Button Controlp. 222
The Check Box Controlp. 223
Control Arraysp. 226
The OptionButton Controlp. 229
The Image Controlp. 232
The Common Dialog Controlp. 235
The Timer Controlp. 236
Let's Tour the China Shop!p. 237
Common Properties of the Controlsp. 239
Namep. 239
Captionp. 240
Indexp. 241
ToolTipTextp. 242
Check Box Propertiesp. 242
Command Button Propertiesp. 247
Defaultp. 248
Cancelp. 248
Common Dialog Propertiesp. 251
CancelErrorp. 251
Flagsp. 254
Frame Propertiesp. 256
Image Control Propertiesp. 258
Stretchp. 258
Label Propertiesp. 259
AutoSizep. 259
List Box Propertiesp. 261
OptionButton Propertiesp. 262
Timer Propertiesp. 265
Intervalp. 265
Tab Order and the TabIndex Propertyp. 266
A Surprise Visitp. 267
Summaryp. 270
Quizp. 272
Chapter 6 A First Look at Codingp. 275
Events and Event-Driven Programmingp. 275
In the Old Daysp. 275
The Modern Approachp. 277
What's an Event?p. 278
An Event or an Event Procedure?p. 278
An Example of an Event Procedure Stubp. 279
The Events in the China Shop Projectp. 281
The Click Eventp. 282
The Load Eventp. 283
The Timer Eventp. 283
Writing Codep. 284
Program Commentsp. 292
The Continuation Character (_)p. 295
A Visual Basic Code Overviewp. 296
Visual Basic Code is Like a Falling Rockp. 297
The Selection Structurep. 299
The Loop Structurep. 302
The Visual Basic Debuggerp. 310
The Debug/Immediate Windowp. 310
Pausing a Visual Basic Programp. 312
The Break Buttonp. 314
Displaying Values in the Code Windowp. 314
The Immediate Windowp. 315
The Stop Statementp. 317
The Debug Menup. 318
Step Intop. 319
Run To Cursorp. 321
Step Overp. 321
Step Outp. 322
Set Next Statementp. 322
Show Next Statementp. 323
The Watch Windowp. 323
Setting a Watch Expressionp. 324
Breakpointsp. 328
Summaryp. 331
Quizp. 332
Chapter 7 Datap. 335
Variablesp. 335
How Do We Create a Variable?p. 337
Variable Declarationp. 338
The Dim Statementp. 340
Oops, Don't Do This!p. 342
Dim Scopep. 342
The Private Statementp. 345
The Public Statementp. 346
The Static Statementp. 347
Where should you Declare a Variable?p. 351
Do Variables Need to be Initialized?p. 352
Visual Basic Data Typesp. 352
Numeric Data Typesp. 353
Integerp. 354
Longp. 355
Singlep. 356
Doublep. 357
Currencyp. 358
String Data Typesp. 358
Other Data Typesp. 360
Booleanp. 360
Datep. 362
Variantp. 362
Property Data Typesp. 363
Constantsp. 364
Operations on Datap. 366
Arithmetic Operationsp. 366
The Subtraction Operatorp. 368
The Multiplication Operatorp. 369
The Integer Division Operatorp. 369
The Floating-Point Division Operatorp. 371
The Mod Operatorp. 371
The Exponentiation Operatorp. 373
Order of Operationsp. 374
Comparison Operatorsp. 377
Logical Operatorsp. 379
The And Operatorp. 379
The Or Operatorp. 382
Mistakes with the Or Operatorp. 383
The Not Operatorp. 385
How Not to use Notp. 387
Summaryp. 389
Quizp. 391
Chapter 8 Selection Structuresp. 393
Falling Rock Behaviorp. 394
How Can We Improve Upon This?p. 397
If...Thenp. 398
If...Then...Elsep. 403
If...Then...Elselfp. 406
Select...Casep. 412
The China Shop Projectp. 418
Reviewing the Prototypep. 440
Summaryp. 442
Quizp. 443
Chapter 9 Loopsp. 449
Why Loops?p. 449
The For...Next Loopp. 450
Variations on the For...Next Themep. 453
Do...Loopsp. 460
Do While...Loopp. 461
Do...Loop Whilep. 468
Do Until...Loopp. 470
Do...Loop Untilp. 473
Mr. Bullina Pays a Surprise Visitp. 474
Summaryp. 480
Quizp. 481
Chapter 10 String Manipulationp. 485
What Exactly is a String?p. 485
String Concatenationp. 486
We've Joined Strings, Now Let's Break Them Apartp. 494
Summaryp. 519
Quizp. 520
Chapter 11 Disk Files and Printer Operationsp. 523
Disk File Operationsp. 523
Writing Data to a Disk Filep. 524
The Open Statementp. 525
The Write # Statementp. 527
The Close Statementp. 528
Reading Data from a Disk Filep. 537
The Input# Statementp. 538
Printer Operationsp. 544
The Printer Objectp. 545
Summaryp. 555
Quizp. 556
Chapter 12 Finishing the User Interfacep. 559
Where Are We Now?p. 559
Drop-Down Menusp. 560
A First Look at the Menu Editorp. 562
Menu Control Propertiesp. 564
Captionp. 564
Namep. 566
Checkedp. 567
The Navigation Buttonsp. 568
Nextp. 571
Insertp. 571
Deletep. 571
Cancelp. 571
OKp. 572
Coding the Menu Controlp. 582
Pop-Up Menusp. 597
More on the MsgBox Functionp. 600
The Return Value of the MsgBox Functionp. 600
Summaryp. 607
Quizp. 609
Chapter 13 Arraysp. 611
Why Do We Need Arrays?p. 611
What's an Array?p. 615
Declaring an Arrayp. 617
Referring to Elements of an Arrayp. 619
The Array Functionp. 624
Dynamic Arraysp. 626
Array Dimensionsp. 632
Modifying the China Shop Projectp. 642
Summaryp. 655
Quizp. 656
Chapter 14 Error Handlingp. 659
Common Beginner Errorsp. 659
Dim X, Y, Z as Integerp. 659
Forgetting to Increment a Counterp. 660
Forgetting to Add to an Accumulatorp. 661
Forgetting to Open a Filep. 662
Opening a File That's Already Openp. 665
Forgetting to Close a Filep. 666
Reading Beyond the End of the Filep. 666
Writing to a File Opened for Inputp. 668
Your Program Doesn't Read Any Recordsp. 669
What If the File You Are Reading is Missing or Empty?p. 670
Reading Too Many or Too Few Fields From a Disk Filep. 674
Division by Zerop. 679
Error Handlingp. 681
Error Handling in the China Shop Projectp. 690
Summaryp. 695
Quizp. 697
Chapter 15 Customizing Your Applicationp. 701
Writing to the Windows Registryp. 701
GetSetting and SaveSettingp. 702
Using RegEditp. 708
Reading from the Windows Registryp. 713
Optimizing Visual Basic Codep. 719
User-Written Proceduresp. 719
Writing Our Own Subproceduresp. 721
Subprocedures in the China Shop Projectp. 725
Testing the Programp. 730
We Meet at the China Shopp. 731
Summaryp. 736
Quizp. 737
Appendix A Answers to Quiz Questionsp. 739
Chapter 1p. 739
Chapter 2p. 741
Chapter 3p. 743
Chapter 4p. 744
Chapter 5p. 746
Chapter 6p. 748
Chapter 7p. 750
Chapter 8p. 752
Chapter 9p. 756
Chapter 10p. 760
Chapter 11p. 763
Chapter 12p. 765
Chapter 13p. 766
Chapter 14p. 769
Chapter 15p. 771
Appendix B Hungarian Notationp. 775
Indexp. 779

Google Preview