Powerful PowerPoint for Educators: Using Visual Basic for Applications to Make PowerPoint Interactive


Download 1.37 Mb.
Pdf ko'rish
bet32/191
Sana08.05.2023
Hajmi1.37 Mb.
#1442581
1   ...   28   29   30   31   32   33   34   35   ...   191
Bog'liq
2.2. Powerful PowerPoint For Educators

myPhoneBook
and
LookUpPerson
) is nec essary to tell the com -
puter that
LookUpPerson
is the thing to do (method) with the ob 
ject
myPhoneBook
. The parentheses tell the computer that the stuff in side is impor-
tant information (parameters) for knowing what the method should do. The
What Is an Ob ject-Oriented Pro gramming Language? 35
!


quotes tell the computer that what’s in side them is text. Leave out any de tail, and 
nothing will work.
Another critical point about ob jects is that they can have parts. Think about
our phone book example. Think about what parts there are to a phone book. Here
are a few ex amples: the cover, pages, the blue pages (for gov ernment listings),
and the phone company in formation (such as how to contact the phone com pany
if your phone stops work ing). Each of these parts is its own ob ject (a particular
page might be an ex ample of the class
Page
, or a range of pages might be an ex -
ample of the class
Pages
). You might access the phone book by accessing a part
of the book. For example,
myPhoneBook.Pages.TurnToTheNextPage
might take the set of pages and turn them to the next one, so if you are on page
57, for example, you will find your self on page 59 (if the page is two-sided).
Now the dot is serving two purposes. The first dot says that
Pages
is a part of the 
ob ject
myPhoneBook
, and the second dot tells the com puter to do the thing (run
the method)
TurnToTheNextPage
, which is something that can be done to
Pages
.
While some parts of an ob ject are other objects, some parts are properties.
For ex ample, a phone book has a color, a number of pages, and a thickness. So
for ex ample, if I wanted to see how thick my phone book is, I might look at that
prop erty:

Download 1.37 Mb.

Do'stlaringiz bilan baham:
1   ...   28   29   30   31   32   33   34   35   ...   191




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling