<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">re: control arrays They work ok in VB.NET if imported from VB6.
<br>
<br>
The indexing convention used is unusual but you can work with an array of controls as per VB6.<br>
<br>
See attached template for Hangman - imported from VB6. Excuse the abstruse wordlist created a student 10 years ago!<br>
<br>
Imaginatively named textboxes are renamed as:_Txt1_1, _Txt1_2, _Txt1_3 etc<br>
Yet in code are accessed thus:<br>
<br>
For i = 1 To 10<br>
Txt1(i).Text = ""<br>
Txt1(i).Visible = False<br>
Next <br>
<br>
<br>
<br>
I assume there are better ways than this, but I just whip up the control array in VB6 then import to .net.<br>
<br>
cheers<br>
Gordon
<div><br>
<div style="font-family: Tahoma; font-size: 13px;"><font style="font-weight: bold;" size="2"><span style="font-family: Arial;">-----------</span><br style="font-family: Arial;">
<span style="font-family: Arial;">Gordon Poultney</span><br style="font-family: Arial;">
<span style="font-family: Arial;">Horsham College</span></font><br>
</div>
</div>
<div style="font-family: Times New Roman; color: rgb(0, 0, 0); font-size: 16px;">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF264454"><font color="#000000" face="Tahoma" size="2"><b>From:</b> sofdev-bounces@edulists.com.au [sofdev-bounces@edulists.com.au] on behalf of Mark KELLY [kel@mckinnonsc.vic.edu.au]<br>
<b>Sent:</b> Tuesday, 24 May 2011 1:47 PM<br>
<b>To:</b> Year 12 Software Development Teachers' Mailing List<br>
<b>Subject:</b> [Year 12 SofDev] Assessor's report<br>
</font><br>
</div>
<div></div>
<div>Hi folk. Sorry for posting about the ITA assessor's report to this list. I hope I didn't confuse you too much.<br>
<br>
I've had SD on the brain recently* and forgot the complaint was about ITA.<br clear="all">
<br>
*I'm finally nearly semi-competent in VB2010 and starting to forget my old VB6 habits, but I certainly miss control arrays.
<br>
Why MS ditched them I'll never know. It use to be SO easy to loop through an array of controls and do things with them, e.g.
<br>
<br>
For i =1 to 99<br>
checkbox(i).checked = false<br>
next<br>
<br>
Sadly, you can't do that easily any more.<br>
<br>
-- <br>
Mark Kelly<br>
Manager of ICT, Reporting, IT Learning Area<br>
McKinnon Secondary College<br>
McKinnon Rd McKinnon 3204, Victoria, Australia<br>
Direct line / Voicemail: +613 8520 9085, Fax +613 9578 9253<br>
<a href="mailto:kel@mckinnonsc.vic.edu.au" target="_blank">kel@mckinnonsc.vic.edu.au</a><br>
VCE IT Lecture Notes: <a href="http://vceit.com" target="_blank">http://vceit.com</a><br>
Moderator: IT Applications Edulist<br>
<br>
<font>Want a good time? Call 0112358. Ask for Mr </font>Fibonacci.<br>
</div>
</div>
</div>
<p></p><p><b>Important - </b>This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Early Childhood Development.</p>
</body>
</html>