رسالة من مناقشة
Fwd: VB1
Received: by 10.11.53.59 with SMTP id b59mr1794297cwa;
Wed, 22 Feb 2006 05:13:45 -0800 (PST)
Return-Path: <vittal...@gmail.com>
Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.207])
by mx.googlegroups.com with ESMTP id v11si1839824cwb.2006.02.22.05.12.28;
Wed, 22 Feb 2006 05:12:29 -0800 (PST)
Received-SPF: pass (googlegroups.com: domain of vittal...@gmail.com designates 64.233.184.207 as permitted sender)
DomainKey-Status: good (test mode)
Received: by wproxy.gmail.com with SMTP id i31so1350238wra
for <rnsitvb@googlegroups.com>; Wed, 22 Feb 2006 05:12:27 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
s=beta; d=gmail.com;
h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references;
b=hvBFzBRBN+Z2tEmx5KqKlB51r6Y6d15PpdifcX5SIzOxn7/2CuQOg177/jLjpSLeiJ3MEDAdMw8M3umlTRY9Cqtxu/L5dRs1qEMcrLziAJ536HptXVDjqURcSQNI6gfSMoJHtfKuPHTNI5bIlWgAD2IuNsVwiHTaMdatpxrQWK0=
Received: by 10.54.76.9 with SMTP id y9mr1185180wra;
Wed, 22 Feb 2006 05:12:25 -0800 (PST)
Received: by 10.54.70.14 with HTTP; Wed, 22 Feb 2006 05:12:24 -0800 (PST)
Message-ID: <d8910e430602220512h6878c787raff4b59087f7cc3@mail.gmail.com>
Date: Wed, 22 Feb 2006 18:42:24 +0530
From: Vittal <vittal...@gmail.com>
To: "RNS VB GROUP" <rnsitvb@googlegroups.com>
Subject: Fwd: VB1
In-Reply-To: <20060222062059.26963.qmail@web8506.mail.in.yahoo.com>
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_Part_10084_595045.1140613944967"
References: <20060222062059.26963.qmail@web8506.mail.in.yahoo.com>
------=_Part_10084_595045.1140613944967
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
---------- Forwarded message ----------
From: vittal <vittal...@yahoo.co.in>
Date: Feb 22, 2006 11:50 AM
Subject: VB1
To: Vittal P <vittal...@gmail.com>
Profsr.com <http://profsr.com/>
[image: Previous page] Previous
<http://www.profsr.com/vb/vbless01.htm> [image:
TOC] Contents <http://www.profsr.com/vb/vbintro.htm#content> [image:
Next page]Next <http://www.profsr.com/vb/vbless02.htm>
------------------------------
LESSON 1 -- Getting started
Defining basic terms ApplicationAn application is a collection of objects
that work together to accomplish something useful. In VB the application is
called a *Project*. A Project could be a the management of a Video store,
the calculation of mortgages, a dating service or the Payroll for 1000
employees.
ObjectAn object is a piece of software that has properties and functions
that can be manipulated. Whew! You're here so, you must be somewhat familia=
r
with the Windows environment. A window is an *object*. It has *properties*:
size, color, position on the screen, etc. (The purists among you may want t=
o
talk about a* class* rather than an *object* but, at this point we just wan=
t
to keep it simple, and the underlying concept is the same). The window has
functions, also called *methods*, that can be manipulated: change the size,
move it around, open it and close it. You do not have to write code to
resize a window - you just click and drag. But somebody had to write code a=
t
some point. Fortunately for us, when they did they put it all in a nice
little package and called it a *window object*. Now, whenever you need a
window in your Project you can make a copy of the window object, change its
properties for color or size very easily, and paste it where you want it.
Then you can use its built-in methods to open it, close it when you want or
resize it whenever necessary. When you create an application using objects
and combining them to produce results, you are working in an *
object-oriented* environment.
Event-drivenTo produce an application in COBOL, a procedural language, you
write COBOL source programs, you compile them into machine code and then yo=
u
run them via a control interface such as JCL. A program can contain 1000's
of lines of source code and could run for hours with no human intervention.
In fact, in large installations, a jobstream can consist of a dozen
programs, all automatically accepting input from the previous program and
producing output for the next. The programmer can be blissfully unaware tha=
t
the program has run unless something catastrophic happens.
In a VB project, the processes that occur have to be associated with *event=
s
*. An event is something that happens - the user clicks on a button, a form
is opened, the result of a calculation is too large. The operation is *
event-driven* because everything that executes does so as the result of som=
e
kind of event. The role of the programmer is to anticipate the events and t=
o
write the code that will be executed when the event occurs. A VB applicatio=
n
is *interactive* in the sense that the user is constantly interacting with
the program. The user inputs a Customer Id, the program checks the Id in th=
e
database and immediately brings up the customer's file or displays a messag=
e
that the particular Id is invalid.
Top <http://www.profsr.com/vb/vbless01.htm#Start>
Jumping right in! Project descriptionWe want to create a Scoreboard for a
football game (there it is already!) between the Giants and the Redskins. T=
o
begin with the simplest task we will only count the touchdowns and display
appropriate messages.
*Please note*: although we will create a complete functional Project with
controls and code and so on, the purpose of this exercise is to show what
can be done. In the following lessons we will be explaining scripts and the
use of controls in a lot more detail. If you study this example you should
be able to relate it to what you already know of programming and judge
whether this tutorial will be easy or hard for you to do.
Creating the ProjectFirst thing to do is to create a Directory where you
will store all your VB Projects. Call it VBApps, for example. Then start VB=
.
The first screen will ask whether you want to open a new project or an
existing one - it's obviously a new one and it will be a Standard EXE. Then=
,
maximize all the windows (it's easier to work with - some of the examples i=
n
the tutorial had to be reduced for the sake of the presentation). Now, save
your project. It will first ask you to save the form - call it Score.frm -
and then the Project - call it Scorebrd.vbp. From now on, do File-->Save
Project very, very frequently.
Before you start to build-up the form, it will make it easier if you change
the color of the form. Otherwise you will be working with grey controls on =
a
grey background. To change the color, just click anywhere on the form, go t=
o
the properties window, find the property called BackColor and change it to
the standard Window background (teal) or to any color you want in the
palette.
In our first example we will need 6 *labels* and 2 *command buttons*. Each
one of these objects that you put on a Form is called a* control*. To get a
control you go to the *Toolbox*, click on the control you want, come back t=
o
the Form and click and drag the control to the size and position you want.
Position the controls somewhat like in the diagram below.
*IMPORTANT NOTE*: If this is your first experience with VB, don't be afraid
to experiment. This is hands-on stuff! Remember that VB is a Microsoft
product, therefore it works with the standard Windows interface. All the
functions you know from MS-Office work the same way here: Copy, Cut, Paste,
(Ctrl)+(Click), (Shift)+(Click), drag the mouse over a group of controls to
select them all, etc. The Undo button is a nice one to keep handy - when yo=
u
modify a control you can always Undo the change - remember this when you ge=
t
to the part about aligning the controls, making them all the same size and
so on. That part can get tricky. If you accidentally end up in the Code
window while palying around, go down a few paragraphs and you will see how
to get back to the Form. At this point the worst that can happen is that
your Form will get all messed up. *So what!* You can just scrap it and star=
t
over again, but you will have learned something.
Now that we have a bunch of controls on the form, we have to jazz them up a
bit. We do this by changing the *Properties* of the controls in the *Proper=
ties
window*. Each control has a whole series of properties, most of which we
won't need right now. The ones we do need are:
Alignment =3D how text aligns in the control
BackColor =3D choose the color of the background
Caption =3D the text that will appear in the control
Font =3D choose the font type and size
ForeColor =3D choose the color of the text (foreground)
As with all Windows applications, you can select multiple controls with
(Ctrl)+(Click) and change a property for all of them at once. For example,
if all backgrounds are white, select all controls, change ForeColor to whit=
e
and all of them are modified. Change your form to look like the one below.
Note that you do not have to change the Caption for Label4, Label5 and
Label6 and that you can't change the color of the buttons. They insist on
being what was called in the old days "IBM grey". *Don't forget to save you=
r
project often as you go along!*
If you *Run* the application at this point, you should see your Form appear=
,
just the way you created it. However if you click on any of the
controls, *absolutely
nothing happens!* There are *events* that occur; the form opens, a button i=
s
clicked, etc. But, there is nothing that tells the form what to do when it
sees an event. That is why we have to write code, also called *script*.
Top <http://www.profsr.com/vb/vbless01.htm#Start>
To switch between the Code window and the Form window, use the buttons just
over the Project Explorer window (diagram on the left).
Once in the Code window, you have the option of seeing all the code for the
Project or the code for one event at a time. Use the buttons in the lower
left-hand corner (diagram on the right).
To select the object and the event you wish to code, use the two Listboxes
at the top of the Code window. The one on the left for the object and the
one on the right for the event. Start with *General ... Declarations* and
then *Form ... Load*, etc.
Now we can *Run* it and see something happen. When the Form loads, it will
initialize the fields that we specified in the code.
Now code the Command1 button and Run it to see the result.
Assignment 1Using what you learned when coding the Command1 button, write
the code for the Command2 button so that the score for the Redskins can als=
o
be captured. *Hint*: don't hesitate to use Copy and Paste.
After you've done it, check out the
Solution<http://www.profsr.com/vb/vbasgn1.htm>.
------------------------------
Top <http://www.profsr.com/vb/vbless01.htm#Start>
Home <http://www.profsr.com/> =20
Tutorials<http://www.profsr.com/home3.html>
------------------------------
Jiyo cricket on Yahoo! India
cricket<http://us.rd.yahoo.com/mail/in/mailcricket/*http://in.sports.yahoo.=
com/cricket/>
Yahoo! Messenger
Mobile<http://us.rd.yahoo.com/mail/in/mailmobilemessenger/*http://in.mobile=
.yahoo.com/new/messenger/>Stay
in touch with your buddies all the time.
------=_Part_10084_595045.1140613944967
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<br><br>---------- Forwarded message ----------<br><span class=3D"gmail_quo=
te">From: <b class=3D"gmail_sendername">vittal</b> <<a href=3D"mailto:vi=
ttal...@yahoo.co.in">vittal...@yahoo.co.in</a>><br>Date: Feb 22, 2006 11=
:50 AM
<br>Subject: VB1<br>To: Vittal P <<a href=3D"mailto:vittal...@gmail.com"=
>vittal...@gmail.com</a>><br><br></span>
<table width=3D"100%" border=3D"0">
<tbody>
<tr>
<td valign=3D"top"><a name=3D"109906af678e3ae9_Start"></a>
<div><a onclick=3D"return top.js.OpenExtLink(window,event,this)" href=3D"ht=
tp://profsr.com/" target=3D"_blank">Profsr.com</a> </div>
<div align=3D"center"><font color=3D"#400080"><img src=3D"http://www.profsr=
.com/images/vbpic4.gif" border=3D"0"><br><br></font></div></td></tr>
<tr>
<td align=3D"right"><br>
<div><a title=3D"Free Visual Basic 6 lesson" onclick=3D"return top.js.OpenE=
xtLink(window,event,this)" href=3D"http://www.profsr.com/vb/vbless01.htm" t=
arget=3D"_blank"><img height=3D"31" alt=3D"Previous page" src=3D"http://www=
.profsr.com/images/cy_l_arr.gif" width=3D"31" border=3D"0">
Previous</a> <a title=3D"Visual Basic 6.0 tra=
ining" onclick=3D"return top.js.OpenExtLink(window,event,this)" href=3D"htt=
p://www.profsr.com/vb/vbintro.htm#content" target=3D"_blank"><img height=3D=
"31" alt=3D"TOC" src=3D"http://www.profsr.com/images/cy_u_arr.gif" width=3D=
"31" border=3D"0">
Contents</a> <a onclick=3D"return top.js.Open=
ExtLink(window,event,this)" href=3D"http://www.profsr.com/vb/vbless02.htm" =
target=3D"_blank"><img height=3D"31" alt=3D"Next page" src=3D"http://www.pr=
ofsr.com/images/cy_r_arr.gif" width=3D"31" border=3D"0">
Next</a></div><br></td></tr>
<tr>
<td>
<hr width=3D"95%">
<div align=3D"center">
<h2>LESSON 1 -- Getting started</h2></div>
<div align=3D"center"><img height=3D"1" src=3D"http://pagead2.googlesyndica=
tion.com/pagead/imp.gif?event=3Dnoiframe&client=3Dca-pub-90232639759559=
96&dt=3D1140588007265&lmt=3D1129335722&format=3D336x280_as&=
output=3Dhtml&url=3Dhttp%3A%2F%2Fwww.profsr.com%2Fvb%2Fvbless01.htm&=
;color_bg=3DFFFFFF&color_text=3D000003&color_link=3D003399&colo=
r_url=3D000003&color_border=3DFFFFFF&ad_type=3Dtext_image&ref=
=3Dhttp%3A%2F%2Fwww.profsr.com%2Fvb%2Fvbintro.htm&cc=3D2050&u_h=3D7=
68&u_w=3D1024&u_ah=3D740&u_aw=3D1024&u_cd=3D32&u_tz=3D3=
30&u_his=3D1&u_java=3Dtrue" width=3D"1" border=3D"0">
</div><br><br>
<div>
<h3>Defining basic terms</h3>
<h4>Application</h4>An application is a collection of objects that work tog=
ether to accomplish something useful. In VB the application is called a <b>=
Project</b>. A Project could be a the management of a Video store, the calc=
ulation of mortgages, a dating service or the Payroll for 1000 employees.
<br>
<h4>Object</h4>An object is a piece of software that has properties and fun=
ctions that can be manipulated. Whew! You're here so, you must be somewhat =
familiar with the Windows environment. A window is an <b>object</b>. It has=
=20
<b>properties</b>: size, color, position on the screen, etc. (The purists a=
mong you may want to talk about a<b> class</b> rather than an <b>object</b>=
but, at this point we just want to keep it simple, and the underlying conc=
ept is the same). The window has functions, also called=20
<b>methods</b>, that can be manipulated: change the size, move it around, o=
pen it and close it. You do not have to write code to resize a window - you=
just click and drag. But somebody had to write code at some point. Fortuna=
tely for us, when they did they put it all in a nice little package and cal=
led it a=20
<b><i>window object</i></b>. Now, whenever you need a window in your Projec=
t you can make a copy of the window object, change its properties for color=
or size very easily, and paste it where you want it. Then you can use its =
built-in methods to open it, close it when you want or resize it whenever n=
ecessary. When you create an application using objects and combining them t=
o produce results, you are working in an=20
<b>object-oriented</b> environment.<br><br>
<h4>Event-driven</h4>To produce an application in COBOL, a procedural langu=
age, you write COBOL source programs, you compile them into machine code an=
d then you run them via a control interface such as JCL. A program can cont=
ain 1000's of lines of source code and could run for hours with no human in=
tervention. In fact, in large installations, a jobstream can consist of a d=
ozen programs, all automatically accepting input from the previous program =
and producing output for the next. The programmer can be blissfully unaware=
that the program has run unless something catastrophic happens.
<br><br>In a VB project, the processes that occur have to be associated wit=
h <b>events</b>. An event is something that happens - the user clicks on a =
button, a form is opened, the result of a calculation is too large. The ope=
ration is=20
<b>event-driven</b> because everything that executes does so as the result =
of some kind of event. The role of the programmer is to anticipate the even=
ts and to write the code that will be executed when the event occurs. A VB =
application is=20
<b>interactive</b> in the sense that the user is constantly interacting wit=
h the program. The user inputs a Customer Id, the program checks the Id in =
the database and immediately brings up the customer's file or displays a me=
ssage that the particular Id is invalid.
<br><br><br>
<div align=3D"center"><a onclick=3D"return top.js.OpenExtLink(window,event,=
this)" href=3D"http://www.profsr.com/vb/vbless01.htm#Start" target=3D"_blan=
k">Top</a></div><br><br>
<div align=3D"center"><img height=3D"1" src=3D"http://pagead2.googlesyndica=
tion.com/pagead/imp.gif?event=3Dnoiframe&client=3Dca-pub-90232639759559=
96&dt=3D1140588009000&lmt=3D1129335722&prev_fmts=3D336x280_as&a=
mp;format=3D336x280_as&output=3Dhtml&url=3Dhttp%3A%2F%2Fwww.profsr.=
com%2Fvb%2Fvbless01.htm&color_bg=3DFFFFFF&color_text=3D000003&c=
olor_link=3D003399&color_url=3D000003&color_border=3DFFFFFF&ad_=
type=3Dtext_image&ref=3Dhttp%3A%2F%2Fwww.profsr.com%2Fvb%2Fvbintro.htm&=
amp;cc=3D2050&u_h=3D768&u_w=3D1024&u_ah=3D740&u_aw=3D1024&a=
mp;u_cd=3D32&u_tz=3D330&u_his=3D1&u_java=3Dtrue" width=3D"1" bo=
rder=3D"0">
</div><br><br>
<h3>Jumping right in!</h3>
<h4>Project description</h4>We want to create a Scoreboard for a football g=
ame (there it is already!) between the Giants and the Redskins. To begin wi=
th the simplest task we will only count the touchdowns and display appropri=
ate messages.
<br><br><b>Please note</b>: although we will create a complete functional P=
roject with controls and code and so on, the purpose of this exercise is to=
show what can be done. In the following lessons we will be explaining scri=
pts and the use of controls in a lot more detail. If you study this example=
you should be able to relate it to what you already know of programming an=
d judge whether this tutorial will be easy or hard for you to do.
<br><br>
<h4>Creating the Project</h4>First thing to do is to create a Directory whe=
re you will store all your VB Projects. Call it VBApps, for example. Then s=
tart VB. The first screen will ask whether you want to open a new project o=
r an existing one - it's obviously a new one and it will be a Standard EXE.=
Then, maximize all the windows (it's easier to work with - some of the exa=
mples in the tutorial had to be reduced for the sake of the presentation). =
Now, save your project. It will first ask you to save the form - call it=20
Score.frm - and then the Project - call it Scorebrd.vbp. From now on, do Fi=
le-->Save Project very, very frequently.<br><br>
<div align=3D"center"><img src=3D"http://www.profsr.com/images/vb01f01.gif"=
border=3D"0"></div><br><br>
<div align=3D"center"><img src=3D"http://www.profsr.com/images/vb01f02.gif"=
border=3D"0"></div><br><br>Before you start to build-up the form, it will =
make it easier if you change the color of the form. Otherwise you will be w=
orking with grey controls on a grey background. To change the color, just c=
lick anywhere on the form, go to the properties window, find the property c=
alled BackColor and change it to the standard Window background (teal) or t=
o any color you want in the palette.
<br><br>In our first example we will need 6 <b>labels</b> and 2 <b>command =
buttons</b>. Each one of these objects that you put on a Form is called a<b=
> control</b>. To get a control you go to the <b>Toolbox</b>, click on the =
control you want, come back to the Form and click and drag the control to t=
he size and position you want. Position the controls somewhat like in the d=
iagram below.
<br><br>
<div align=3D"center"><img src=3D"http://www.profsr.com/images/vb01f03.gif"=
border=3D"0"></div><br><br>
<div align=3D"center">
<table width=3D"70%" bgcolor=3D"#ffffcc">
<colgroup>
<col>
<tbody>
<tr>
<td><br>
<div><b>IMPORTANT NOTE</b>: If this is your first experience with VB, don't=
be afraid to experiment. This is hands-on stuff! Remember that VB is a Mic=
rosoft product, therefore it works with the standard Windows interface. All=
the functions you know from MS-Office work the same way here: Copy, Cut, P=
aste, (Ctrl)+(Click), (Shift)+(Click), drag the mouse over a group of contr=
ols to select them all, etc. The Undo button is a nice one to keep handy - =
when you modify a control you can always Undo the change - remember this wh=
en you get to the part about aligning the controls, making them all the sam=
e size and so on. That part can get tricky. If you accidentally end up in t=
he Code window while palying around, go down a few paragraphs and you will =
see how to get back to the Form. At this point the worst that can happen is=
that your Form will get all messed up.=20
<b>So what!</b> You can just scrap it and start over again, but you will ha=
ve learned something.</div><br></td></tr></tbody></colgroup></table></div><=
br><br>Now that we have a bunch of controls on the form, we have to jazz th=
em up a bit. We do this by changing the=20
<b>Properties</b> of the controls in the <b>Properties window</b>. Each con=
trol has a whole series of properties, most of which we won't need right no=
w. The ones we do need are:<br>
<div align=3D"center">Alignment =3D how text aligns in the control<br>BackC=
olor =3D choose the color of the background<br>Caption =3D the text that wi=
ll appear in the control<br>Font =3D choose the font type and size<br>ForeC=
olor =3D choose the color of the text (foreground)
<br> </div>As with all Windows applications, you can select multiple c=
ontrols with (Ctrl)+(Click) and change a property for all of them at once. =
For example, if all backgrounds are white, select all controls, change Fore=
Color to white and all of them are modified. Change your form to look like =
the one below. Note that you do not have to change the Caption for Label4, =
Label5 and Label6 and that you can't change the color of the buttons. They =
insist on being what was called in the old days "IBM grey".=20
<b>Don't forget to save your project often as you go along!</b><br><br><br>=
<br><br>
<div align=3D"center"><img height=3D"1" src=3D"http://pagead2.googlesyndica=
tion.com/pagead/imp.gif?event=3Dnoiframe&client=3Dca-pub-90232639759559=
96&dt=3D1140588011078&lmt=3D1129335722&prev_fmts=3D336x280_as%2=
C336x280_as&format=3D336x280_as&output=3Dhtml&url=3Dhttp%3A%2F%=
2Fwww.profsr.com%2Fvb%2Fvbless01.htm&color_bg=3DFFFFFF&color_text=
=3D000003&color_link=3D003399&color_url=3D000003&color_border=
=3DFFFFFF&ad_type=3Dtext_image&ref=3Dhttp%3A%2F%2Fwww.profsr.com%2F=
vb%2Fvbintro.htm&cc=3D2050&u_h=3D768&u_w=3D1024&u_ah=3D740&=
amp;u_aw=3D1024&u_cd=3D32&u_tz=3D330&u_his=3D1&u_java=3Dtru=
e" width=3D"1" border=3D"0">
</div><br><br><br><br><br>
<div align=3D"center"><img height=3D"516" src=3D"http://www.profsr.com/imag=
es/vb01f04.gif" width=3D"599" border=3D"0"></div><br><br>If you <b>Run</b> =
the application at this point, you should see your Form appear, just the wa=
y you created it. However if you click on any of the controls,=20
<b>absolutely nothing happens!</b> There are <b>events</b> that occur; the =
form opens, a button is clicked, etc. But, there is nothing that tells the =
form what to do when it sees an event. That is why we have to write code, a=
lso called=20
<b>script</b>. <br><br>
<div align=3D"center"><a onclick=3D"return top.js.OpenExtLink(window,event,=
this)" href=3D"http://www.profsr.com/vb/vbless01.htm#Start" target=3D"_blan=
k">Top</a></div><br><br>
<div align=3D"center"><img height=3D"222" src=3D"http://www.profsr.com/imag=
es/vb01f10.gif" width=3D"208" border=3D"0"> &=
nbsp; <img height=3D"218" src=3D"http://www.pr=
ofsr.com/images/vb01f09.gif" width=3D"222" border=3D"0"> </div><br><br>
To switch between the Code window and the Form window, use the buttons just=
over the Project Explorer window (diagram on the left). <br>Once in the Co=
de window, you have the option of seeing all the code for the Project or th=
e code for one event at a time. Use the buttons in the lower left-hand corn=
er (diagram on the right).
<br>To select the object and the event you wish to code, use the two Listbo=
xes at the top of the Code window. The one on the left for the object and t=
he one on the right for the event. Start with <b>General ... Declarations
</b> and then <b>Form ... Load</b>, etc.<br><br>
<div align=3D"center"><img height=3D"347" src=3D"http://www.profsr.com/imag=
es/vb01f05.gif" width=3D"448" border=3D"0"></div><br><br>
<div align=3D"center"><img height=3D"395" src=3D"http://www.profsr.com/imag=
es/vb01f06.gif" width=3D"440" border=3D"0"></div><br><br>Now we can <b>Run<=
/b> it and see something happen. When the Form loads, it will initialize th=
e fields that we specified in the code.
<br><br>Now code the Command1 button and Run it to see the result.<br><br>
<div align=3D"center"><img height=3D"456" src=3D"http://www.profsr.com/imag=
es/vb01f07.gif" width=3D"475" border=3D"0"></div><br><br>
<h3>Assignment 1</h3>Using what you learned when coding the Command1 button=
, write the code for the Command2 button so that the score for the Redskins=
can also be captured. <b>Hint</b>: don't hesitate to use Copy and Paste.
<br><br>After you've done it, check out the <a onclick=3D"return top.js.Ope=
nExtLink(window,event,this)" href=3D"http://www.profsr.com/vb/vbasgn1.htm" =
target=3D"_blank">Solution</a>.=20
<div align=3D"center"></div><br><br><br><br><br>
<div align=3D"center"><img height=3D"1" src=3D"http://pagead2.googlesyndica=
tion.com/pagead/imp.gif?event=3Dnoiframe&client=3Dca-pub-90232639759559=
96&dt=3D1140588014312&lmt=3D1129335722&prev_fmts=3D336x280_as%2=
C336x280_as%2C336x280_as&format=3D728x15_0ads_al&output=3Dhtml&=
url=3Dhttp%3A%2F%2Fwww.profsr.com%2Fvb%2Fvbless01.htm&color_bg=3DFFFFFF=
&color_text=3D000003&color_link=3D003399&color_url=3D000003&=
;color_border=3DFFFFFF&ref=3Dhttp%3A%2F%2Fwww.profsr.com%2Fvb%2Fvbintro=
.htm&cc=3D2050&u_h=3D768&u_w=3D1024&u_ah=3D740&u_aw=3D1=
024&u_cd=3D32&u_tz=3D330&u_his=3D1&u_java=3Dtrue" width=3D"=
1" border=3D"0">
</div><br><br><br>
<div align=3D"center">
<hr width=3D"90%">
<br><br><a onclick=3D"return top.js.OpenExtLink(window,event,this)" href=3D=
"http://www.profsr.com/vb/vbless01.htm#Start" target=3D"_blank">Top</a><br>=
<br><br><br><a title=3D"Free Microsoft Access, Visual Basic training" oncli=
ck=3D"return top.js.OpenExtLink(window,event,this)" href=3D"http://www.prof=
sr.com/" target=3D"_blank">
Home</a> =
<a title=3D"Free tutorials Access, VB, SQL" onclic=
k=3D"return top.js.OpenExtLink(window,event,this)" href=3D"http://www.profs=
r.com/home3.html" target=3D"_blank">Tutorials</a> </div><span class=3D"ad">=
<br><br>
</span></div><span class=3D"ad"><br><br></span></td></tr></tbody></table><s=
pan class=3D"ad">
<p>
<hr size=3D"1">
Jiyo cricket on <a onclick=3D"return top.js.OpenExtLink(window,event,this)"=
href=3D"http://us.rd.yahoo.com/mail/in/mailcricket/*http://in.sports.yahoo=
.com/cricket/" target=3D"_blank">Yahoo! India cricket</a><br><a onclick=3D"=
return top.js.OpenExtLink(window,event,this)" href=3D"http://us.rd.yahoo.co=
m/mail/in/mailmobilemessenger/*http://in.mobile.yahoo.com/new/messenger/" t=
arget=3D"_blank">
Yahoo! Messenger Mobile</a> Stay in touch with your buddies all the time.=
=20
<p></p></p></span>
------=_Part_10084_595045.1140613944967--