|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Control ArraysHi,
I loved being about to use control arrays in vb classic. Doesn't look like i can do this in vb.net? Any input? Hi Brian,
VB.NET and VB has the similar VB syntax, but the VB.NET is new designed .NET programming language based on CLR. The control array is no longer supported in VB.NET. Here is link for your reference. Control Array Changes in Visual Basic .NET http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/ vbconcontrolarraychangesinvisualbasicnet.asp Best regards, Peter Huang Microsoft Online Partner Support Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. Peter,
> Control Array Changes in Visual Basic .NET Can that page not be removed or be corrected? It is not giving the right > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/ > vbconcontrolarraychangesinvisualbasicnet.asp > information. (there is so old that there is not even a link on that to report that). See the answer from Randy. I would have written something the same as he had not done that. Cor Hello, Brian,
I also thought that I would miss this feature. I was wrong! In .Net you can use arrays or collections of controls. I think that once you get into it you will find this is more versatile than the old VB "control arrays". One reason that I used to like the old VB control arrays was the ability it gave to use the same event handler for a number of controls. In .Net you can not only assign the same event handler to multiple controls, but (unlike with the old VB control arrays) the controls can be of diverse types. So for example, you can have the same handler deal with text changes in a TextBox or a ComboBox. Cheers, Randy Brian Shafer wrote: Show quoteHide quote > Hi, > I loved being about to use control arrays in vb classic. Doesn't look like > i can do this in vb.net? > Any input? > > "Brian Shafer" <bsgallatin@community.nospam> schrieb: Accessing controls by their names or indices> I loved being about to use control arrays in vb classic. Doesn't look > like i can do this in vb.net? <URL:http://dotnet.mvps.org/dotnet/faqs/?id=controlbynameindex&lang=en> -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Private myButtons As Button() = {Button1, Button2}
Private Sub Form_Load(...) For Each btn As Button In myButtons AddHandler btn.Click, AddressOf myButtons_Click Next btn End Sub or Private Sub myButtons_Click(...) Handles Button1.Click, Button2.Click .... End Sub
Help creating custom ComboBox control
Can opacity/transparency be adjusted within components? Text Files No tables visible in SQL Server connection Unable to open file Basic How To Question: Class Library or Windows Control Library Progress bar - No activity Splash screens / loading & unloading forms PropertyChanged event with VB.NET (.NET 1.1) reading from a text file problem |
|||||||||||||||||||||||