<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18928">
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT size=2 face=Arial>Hi Maggie,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Try this...</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Set up a form with 7 picture boxes, a button and a
timer:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial><IMG border=0 hspace=0 alt="" align=baseline
src="cid:41B339D7D566434A9B5010E68AC0034D@your9431d622db"></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Set the Visible property of each of the picture
boxes False.</FONT></DIV>
<DIV><FONT size=2 face=Arial>Then set each Tag property to the numbers that use
this rectangle. For example, the top horizontal picture box will have a Tag
02356789, because these are the numbers that use it.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Set the Interval property of the timer to 1000 (1
second).</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Now here's the code:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<P>Public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT
color=#0000ff size=2>Class</FONT></FONT><FONT size=2> Form1</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2> Private</FONT></FONT><FONT size=2>
</FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>Sub</FONT></FONT><FONT size=2> tmrCount_Tick(</FONT><FONT color=#0000ff
size=2><FONT color=#0000ff size=2>ByVal</FONT></FONT><FONT size=2> sender
</FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>As</FONT></FONT><FONT size=2> System.Object, </FONT><FONT color=#0000ff
size=2><FONT color=#0000ff size=2>ByVal</FONT></FONT><FONT size=2> e
</FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>As</FONT></FONT><FONT size=2> System.EventArgs) </FONT><FONT
color=#0000ff size=2><FONT color=#0000ff size=2>Handles</FONT></FONT><FONT
size=2> tmrCount.Tick</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>
Static</FONT></FONT><FONT size=2> Num </FONT><FONT color=#0000ff size=2><FONT
color=#0000ff size=2>As</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff
size=2><FONT color=#0000ff size=2>Integer</FONT></FONT><FONT size=2> = 9</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>
Dim</FONT></FONT><FONT size=2> obj </FONT><FONT color=#0000ff size=2><FONT
color=#0000ff size=2>As</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff
size=2><FONT color=#0000ff size=2>Object</P></FONT></FONT><FONT size=2>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>
For</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT
color=#0000ff size=2>Each</FONT></FONT><FONT size=2> obj </FONT><FONT
color=#0000ff size=2><FONT color=#0000ff size=2>In</FONT></FONT><FONT size=2>
</FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>Me</FONT></FONT><FONT size=2>.Controls</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>
If</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff
size=2><FONT color=#0000ff size=2>TypeOf</FONT></FONT><FONT size=2> obj
</FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>Is</FONT></FONT><FONT size=2> PictureBox </FONT><FONT color=#0000ff
size=2><FONT color=#0000ff size=2>Then</P></FONT></FONT><FONT size=2>
<P>
obj.Visible = obj.Tag.Contains(Num)</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>
End</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff
size=2><FONT color=#0000ff size=2>If</P></FONT></FONT><FONT size=2>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>
Next</P></FONT></FONT><FONT size=2>
<P> Num -= 1</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>
If</FONT></FONT><FONT size=2> Num < 0 </FONT><FONT color=#0000ff size=2><FONT
color=#0000ff size=2>Then</P></FONT></FONT><FONT size=2>
<P>
tmrCount.Stop()</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>
End</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT
color=#0000ff size=2>If</P></FONT></FONT><FONT size=2>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2> End</FONT></FONT><FONT size=2>
</FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>Sub</FONT></FONT></P>
<P><FONT color=#0000ff size=2><FONT color=#0000ff
size=2> </P></FONT></FONT><FONT size=2>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2> Private</FONT></FONT><FONT size=2>
</FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>Sub</FONT></FONT><FONT size=2> btnStart_Click(</FONT><FONT color=#0000ff
size=2><FONT color=#0000ff size=2>ByVal</FONT></FONT><FONT size=2> sender
</FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>As</FONT></FONT><FONT size=2> System.Object, </FONT><FONT color=#0000ff
size=2><FONT color=#0000ff size=2>ByVal</FONT></FONT><FONT size=2> e
</FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>As</FONT></FONT><FONT size=2> System.EventArgs) </FONT><FONT
color=#0000ff size=2><FONT color=#0000ff size=2>Handles</FONT></FONT><FONT
size=2> btnStart.Click</P>
<P> tmrCount.Start()</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2> End</FONT></FONT><FONT size=2>
</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Sub</P>
<P>End</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT
color=#0000ff size=2>Class</P></FONT></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>What do you think?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>regards,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Graeme Summers</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>----- Original Message ----- </FONT>
<DIV><FONT size=2 face=Arial>From: "Maggie" <</FONT><A
href="mailto:iaquinto@ozemail.com.au"><FONT size=2
face=Arial>iaquinto@ozemail.com.au</FONT></A><FONT size=2
face=Arial>></FONT></DIV>
<DIV><FONT size=2 face=Arial>To: "VBasic" <</FONT><A
href="mailto:vbasic@edulists.com.au"><FONT size=2
face=Arial>vbasic@edulists.com.au</FONT></A><FONT size=2
face=Arial>></FONT></DIV>
<DIV><FONT size=2 face=Arial>Sent: Sunday, June 20, 2010 6:46 PM</FONT></DIV>
<DIV><FONT size=2 face=Arial>Subject: [Visual Basic] how to run a set of click
events or procedures</FONT></DIV></DIV>
<DIV><FONT face=Arial><BR><FONT size=2></FONT></FONT></DIV><FONT size=2
face=Arial>>I am using one of Adrian Janson's exercises - similar to the LCD
<BR>> display. In this exercise you can click on a 3 and it shows the numeral
<BR>> three highlighted by several rectangles to appear as the
number.<BR>> <BR>> I want to show a countdown - yes I can do a countdown
with a timer and <BR>> output the countdown in a label as in: 10 - 9 - 8 etc.
- but this is <BR>> different.<BR>> <BR>> What I would like to do is to
run all these click events to show a <BR>> countdown.<BR>> <BR>> So the
click event for 8 has its own sequence of statements; the click <BR>> event
for 7 has its own, etc.<BR>> <BR>> I want a button to run the coding for
each of these click events.<BR>> <BR>> How do I do that?<BR>> <BR>>
Maggie<BR>> _______________________________________________<BR>> </FONT><A
href="http://www.edulists.com.au"><FONT size=2
face=Arial>http://www.edulists.com.au</FONT></A><FONT size=2 face=Arial> - FAQ,
resources, subscribe, unsubscribe<BR>> Vbasic Mailing List kindly supported
by<BR>> </FONT><A href="http://www.vcaa.vic.edu.au"><FONT size=2
face=Arial>http://www.vcaa.vic.edu.au</FONT></A><FONT size=2 face=Arial> -
Victorian Curriculum and Assessment Authority and<BR>> </FONT><A
href="http://www.vitta.org.au"><FONT size=2
face=Arial>http://www.vitta.org.au</FONT></A><FONT size=2 face=Arial> -
VITTA Victorian Information Technology Teachers Association
Inc<BR>></FONT></BODY></HTML>