Professional Documents
Culture Documents
Prepared by
Prof.Ahmed Fahmy Amin Mahrous
Professor of Computer, AAST
Minister's Consultant for Information Technology
Revised by
Translated by
Acknowledgments
Most importantly, we are grateful to Prof. Yousry Saber Elgamal,
the Minister of Education, for giving us the opportunity to write this
book, for his support and understanding.
Many people have worked very hard to design and produce this
text. However, there are a number of people who deserve special
recognition. First we would like to thank Mrs. Suzan Abdel Fatah
Marzouk, the general director of Computer Education, and Mrs. Salma
Aly Ibrahim, the Computer expert, for their extremely helpful
suggestions on content and pedagogy as well as revision of the Arabic
version.
The Graphics department at the Ministry of Education also
deserves recognition and thanks for all their help. This includes Dr.
Fathia khairy and Eng. Manal Elgendy for their remarkable job that
turned the rough wording into a fine book.
Preface
This
book
is
designed primarily to
teach
programming
fundamentals. The important point here is that many Visual Basic texts
focus on the Cool Visual Basic gizmos and, in doing so, fail to teach
the programming concepts that are common to all languages. That is why
we titled our book Introduction to programming using Visual Basic Dot
NET, not Learning Microsoft Visual Basic Dot NET. We think this
distinction is important because languages come and go, but fundamental
concepts underlying the programming process stay fairly constant.
If teaching programming fundamentals is our primary goal, then
why we have chosen Visual Basic Dot NET and not some other
language? The answer is simple: we feel that Visual Basic Dot NET is the
language that facilitates our main goal by being relatively easy to learn
without the overly complex syntactic and semantic rules found in some
other languages.
In fact, our book is consisting of two parts, one part for each term.
If you look at table of contents of this part, you will find that it consists of
6 Chapters:
Chapter 1 gives you an idea about programming languages
and the differences between compilers and interpreters.
Chapter 2 explains the Flowcharting. This chapter has many
solved examples.
Chapter 3 explains the Pseudocode fundamentals. In this
chapter we wrote the pseucode for all examples of Chapter 2.
Chapter 4 explains the principles of Object Oriented
Programming (OOP) in a very smooth way.
Table of Contents
CHAPTER ONE
An introduction to Programming
CHAPTER TWO
5
5
6
6
9
10
2.2 Flowcharting
10
14
14
15
17
18
18
34
Pseudocode
CHAPTER THREE
CHAPTER FOUR
3.1 Introduction
36
3. 2 Components
37
38
39
3.4.1. Sequence
39
3.4.2. Selection
39
3.4.2. Iterations
41
43
44
3. 7 Questions
57
36
59
4.1 Introduction
59
60
4.2.1 Objects
60
4. 2.2 Properties
61
4.2.3 Methods
62
4.2.4 Events
64
4.2.5 Classes
66
69
4.3.1 Encapsulation
69
4.3.2 Inheritance
71
4.4 Questions
72
CHAPTER FIVE
75
75
75
77
78
81
Project
CHAPTER SIX
85
86
5.6 Questions
89
Introduction to Controls
91
91
92
92
6.2.2 Events
99
116
117
properties
6.3.2 Events
6.4 The TextBox Control
6.4.1 TextBox Controls appearance and
118
126
126
properties
6.4.2 Events
130
6.4.3 Methods
135
136
136
139
141
APPENDIX
Appendix A
Installing of Visual Basic .NET 2005
144
148
151