Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2007

Tip: Looking for answers? Try searching our database.

Indexed controls under VB 2005, how to do ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
degas - 23 Oct 2007 21:03 GMT
Hello all !

I'm trying "upgrading myself" (I'm afraid it won't be easy...) from VB 5.0
to VB 2005 Express Edition.

In VB 5, I was used to creating indexed controls at design time, let's say
lbl(0), lbl(1), and so on...
It was quite easy : creating lbl, setting the Index property (0), then
Ctrl-C on lbl(0), and Ctrl-V as often as necessary.

In VB 2005 Express, I'm unable to find the Index property of a label.

In order to understand, I have designed -- under VB 5 -- a very simple
project with 2 indexed labels and I have loaded it under VB 2005. It runs
but, according to the Property window, these controls are named "_lbl_0" and
"_lbl_1" instead of the expected lbl(0) and lbl(1).
In the source code , I can read "lbl(i)", as I have written under VB5.

Having a look at the code, I'm unable to understand how it works. It appears
to me much more difficult than VB5.

Do I have to build my form ONLY with some code and to create my controls at
run time ?
Is it possible to declare an array of labels ? How ?

Thanks a lot for your help.

Gabriel
Terry - 23 Oct 2007 22:47 GMT
Control arrays no longer are supported.  Look up ' Control array' in the msdn
documentaion for workarounds.  Documentation is available here:
http://msdn2.microsoft.com/en-us/default.aspx

Signature

Terry

> Hello all !
>
[quoted text clipped - 24 lines]
>
> Gabriel
Tom Shelton - 24 Oct 2007 00:40 GMT
> Hello all !
>
[quoted text clipped - 24 lines]
>
> Gabriel

First the bad news... There is no such thing as a control array in
VB.NET.  Sure, you can create arrays and lists of controls, but you
have to do it your self, the ide won't do it for you.

Now, there may or may not be good news here depending on what you want
to do with the array?  Why don't you give an example of what it is you
wish to accomplish, and someone can probably point you to a solution.

--
Tom Shelton

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.