Visual Basic and Database access.doc

(23797 KB) Pobierz
Learn Visual Basic 6



              Database Access and Management              8-448

 

Learn Visual Basic 6.0

 

© KIDware (206) 721-2556

 

 

 

This copy of Learn Visual Basic 6.0 is licensed to a single user.  Copies of the course are not to be distributed or provided to any other user.  Multiple copy licenses are available for businesses and educational institutions.  Please contact KIDware for license information.

 

 

 


Course Description:

 

Learn Visual Basic 6.0 is a 10 week, self-paced overview of the Visual Basic programming language and environment.  Upon completion of the course, you will:

 

1.     Understand the benefits of using Microsoft Visual Basic 6.0 as an application development tool.

2.     Understand the Visual Basic event-driven programming concepts, terminology, and available tools.

3.     Learn the fundamentals of designing, implementing, and distributing a wide variety of Visual Basic applications.

 

Learn Visual Basic 6.0 is presented using a combination of course notes (written in Microsoft Word format) and over 60 Visual Basic examples and applications.

 

Course Prerequisites:

 

To grasp the concepts presented in Learn Visual Basic 6.0, you should possess a working knowledge of Windows 95 and have had some exposure to programming concepts.  If you have never programmed a computer before, you’ll have to put in a little more effort - perhaps, find a book in your local library on programming using QBasic or some other dialect of the Basic computer language.

 

You will also need the ability to view and print documents saved in Microsoft Word for Windows 95 format.  This can be accomplished in one of two ways.  The first, and easiest, is that you already have Microsoft Word for Windows 95 on your computer.  The second way, and a bit more difficult, is that you can download Word Viewer for Windows 95.  This is a free Microsoft product that allows viewing Word documents - it is available for download at all the major shareware internet sites (ZDNet, Download.Com, SoftSeek).

 

Finally, and most obvious, you need to have Microsoft Visual Basic 6.0, preferably the Professional Edition.  Learn Visual Basic 6.0 does not cover the rudiments of navigating in Visual Basic 6.0.  You should be familiar with the simple tasks of using the menus, the toolbar, resizing windows, and moving windows around.  Visual Basic 6.0 provides an excellent tutorial with instruction on such tasks.

 


Installing Learn Visual Basic 6.0:

 

The course notes and code for Learn Visual Basic 6.0 are included in two ZIP files (LVB61.ZIP and LVB62.ZIP) on separate disks.  Use your favorite ‘unzipping’ application to write all files to your computer.  After unzipping, the course is included in the folder entitled LearnVB6.  This folder contains two other folders:  VB Notes and VB Code.

 

The VB Notes folder includes all the notes needed for the class.  Each file in this folder has a DOC extension and is in Word for Windows 95 format.  The files are:

 

Start Here.doc              This file in Word format

Contents.doc              Course Table of Contents

Class 1.doc              Class 1. Introduction to the Visual Basic Language and Environment

Class 2.doc              Class 2. The Visual Basic Language

Class 3.doc              Class 3. Exploring the Visual Basic Toolbox

Class 4.doc              Class 4. More Exploration of the Visual Basic Toolbox

Class 5.doc              Class 5. Creating a Stand-Alone Visual Basic Application

Class 6.doc              Class 6. Error-Handling, Debugging and File Input/Output

Class 7.doc              Class 7. Graphics Techniques with Visual Basic

Class 8.doc              Class 8. Database Access and Management

Class 9.doc              Class 9. Dynamic Link Libraries and the Windows API

Class 10.doc              Class 10. Other Visual Basic Topics

Appendix I.doc              Appendix I. Visual Basic Symbolic Constants

Appendix II.doc              Appendix II. Common Dialog Box Constants

 

The VB Code folder includes all the Visual Basic applications developed during the course.  The applications are further divided into Class folders.

 

 

How To Take the Course:

 

Learn Visual Basic 6.0 is a self-paced course.  The suggested approach is to do one class a week for ten weeks.  Each week’s class should require about 4 to 8 hours of your time to grasp the concepts completely.  Prior to doing a particular week’s work, open the class notes file for that week and print it out.  Then, work through the notes at your own pace.  Try to do each example as they are encountered in the notes.  If you need any help, all solved examples are included in the VB Code folder.  After completing each week’s notes, a homework exercise is given, covering many of the topics taught that week.  Like the examples, try to work through the homework exercise, or some variation thereof, on your own.  Refer to the completed project in the VB Code folder, if necessary.

 


What If You Have Questions?

 

It is recognized there may be times when you need clarification on some point about the notes, examples, or Visual Basic.  We will gladly help.  The preferred method of relaying your questions to us is via E-Mail.  The E-Mail address is:

 

KIDware@jetcity.com

 

Please include a clearly defined subject for all questions to get past our anti-spamming filters.  All questions should be sent to the attention of Lou.

 

 

Who Produces Learn Visual Basic 6.0?

 

This course has been developed by Lou Tylee, a partner in KIDware, a producer of quality children’s educational programs for over 15 years.  The course notes have evolved based on Lou’s experience in writing children’s software and in teaching a similar course at the university level for over four years.  KIDware may be contacted via:

 

KIDware

15600 NE 8th, Suite B1-314

Bellevue, WA 98008

(206) 721-2556

FAX (425) 746-4655

E-Mail:  KIDware@jetcity.com

Web Site:  http://www.jetcity.com/~kidware

 

 

 

 

Course Notes for:

 

Learn Visual Basic 6.0

 

 

 

 

 

© Lou Tylee, 1998

 

KIDware

15600 NE 8th, Suite B1-314

Bellevue, WA 98008

(206) 721-2556

FAX (425) 746-4655


 

 

 

 

 

Notice

 

These notes were developed for the course, “Learn Visual Basic 6.0”  They are not intended to be a complete reference to Visual Basic.  Consult the Microsoft Visual Basic Programmer’s Guide and Microsoft Visual Basic Language Reference Manual for detailed reference information.

 

The notes refer to several software and hardware products by their trade names.  These references are for informational purposes only and all trademarks are the property of their respective companies.

 

              Lou Tylee

              Course Instructor

 


Learn Visual Basic 6.0

 

Contents

 

 

1.              Introduction to the Visual Basic Language and Environment

 

              Preview              1-1

              Course Objectives              1-1

              What is Visual Basic?              1-2

              Visual Basic 6.0 versus Other Versions of Visual Basic              1-3

              16 Bits versus 32 Bits              1-3

              Structure of a Visual Basic Application              1-4

              Steps in Developing Application              1-4

              Drawing the User Interface and Setting Properties              1-5

              Example 1-1: Stopwatch Application - Drawing Controls              1-9

              Setting Properties of Objects at Design Time              1-10

              Setting Properties at Run Time              1-11

              How Names Are Used in Object Events              1-11

              Example 1-2: Stopwatch Application - Setting Properties              1-12

              Variables              1-14

              Visual Basic Data Types              1-14

              Variable Declaration              1-14

              Example 1-3: Stopwatch Application - Attaching Code              1-18

              Quick Primer on Saving Visual Basic Applications              1-20

              Exercise 1: Calendar/Time Display              1-21


2.              The Visual Basic Language

             

              Review and Preview              2-1

              A Brief History of Basic              2-1

              Visual Basic Statements and Expressions              2-2

              Visual Basic Operators              2-3

              Visual Basic Functions              2-4

              A Closer Look at the Rnd Function              2-5

              Example 2-1: Savings Account              2-6

              Visual Basic Symbolic Constants              2-10

              Defining Your Own Constants              2-10

              Visual Basic Branching - If Statements              2-11

              Key Trapping              2-12

              Example 2-2: Savings Account - Key Trapping              2-14

              Select Case - Another Way to Branch              2-16

              The GoTo Statement              2-17

              Visual Basic Looping              2-17

              Visual Basic Counting              2-19

              Example 2-3: Savings Account - Decisions              2-20

              Exercise 2-1: Computing a Mean and Standard Deviation              2-23

              Exercise 2-2: Flash Card Addition Problems              2-28

 

3.              Exploring the Visual Basic Toolbox

 

              Review and Preview              3-1

              The Message Box              3-1

              Object Methods              3-3

              The Form Object              3-4

              Command Buttons              3-5

              Label Boxes              3-5

              Text Boxes              3-6

              Example 3-1: Password Validation              3-8

              Check Boxes              3-11

              Option Buttons              3-11

              Arrays              3-12

              Control Arrays              3-13

              ...

Zgłoś jeśli naruszono regulamin