[Year 12 SofDev] Assessor's report
Poultney, Gordon A
Poultney.Gordon.A at edumail.vic.gov.au
Wed May 25 10:29:18 EST 2011
re: control arrays They work ok in VB.NET if imported from VB6.
The indexing convention used is unusual but you can work with an array of controls as per VB6.
See attached template for Hangman - imported from VB6. Excuse the abstruse wordlist created a student 10 years ago!
Imaginatively named textboxes are renamed as:_Txt1_1, _Txt1_2, _Txt1_3 etc
Yet in code are accessed thus:
For i = 1 To 10
Txt1(i).Text = ""
Txt1(i).Visible = False
Next
I assume there are better ways than this, but I just whip up the control array in VB6 then import to .net.
cheers
Gordon
-----------
Gordon Poultney
Horsham College
________________________________
From: sofdev-bounces at edulists.com.au [sofdev-bounces at edulists.com.au] on behalf of Mark KELLY [kel at mckinnonsc.vic.edu.au]
Sent: Tuesday, 24 May 2011 1:47 PM
To: Year 12 Software Development Teachers' Mailing List
Subject: [Year 12 SofDev] Assessor's report
Hi folk. Sorry for posting about the ITA assessor's report to this list. I hope I didn't confuse you too much.
I've had SD on the brain recently* and forgot the complaint was about ITA.
*I'm finally nearly semi-competent in VB2010 and starting to forget my old VB6 habits, but I certainly miss control arrays.
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.
For i =1 to 99
checkbox(i).checked = false
next
Sadly, you can't do that easily any more.
--
Mark Kelly
Manager of ICT, Reporting, IT Learning Area
McKinnon Secondary College
McKinnon Rd McKinnon 3204, Victoria, Australia
Direct line / Voicemail: +613 8520 9085, Fax +613 9578 9253
kel at mckinnonsc.vic.edu.au<mailto:kel at mckinnonsc.vic.edu.au>
VCE IT Lecture Notes: http://vceit.com
Moderator: IT Applications Edulist
Want a good time? Call 0112358. Ask for Mr Fibonacci.
Important - 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.edulists.com.au/pipermail/sofdev/attachments/20110525/6ea1d4b1/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hangman.zip
Type: application/x-zip-compressed
Size: 48352 bytes
Desc: hangman.zip
Url : http://www.edulists.com.au/pipermail/sofdev/attachments/20110525/6ea1d4b1/hangman-0001.zip
More information about the sofdev
mailing list