473,396 Members | 1,826 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Control array in vb.net

Please show me
Control array in vb.net

Thanks
Nov 20 '05 #1
6 1254


Nov 20 '05 #2
Thar Aint Nairn
you add "ControlName.EventName" in a comma-separated list after the word
"Handles" to get similar functionality for event handling - but -

I miss it too

"samean" <sa******@hellogsm.com.kh> wrote in message
news:70****************************@phx.gbl...
Please show me
Control array in vb.net

Thanks

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.732 / Virus Database: 486 - Release Date: 7/29/2004
Nov 20 '05 #3
Thar Aint Nairn
you add "ControlName.EventName" in a comma-separated list after the word
"Handles" to get similar functionality for event handling - but -

I miss it too

"samean" <sa******@hellogsm.com.kh> wrote in message
news:70****************************@phx.gbl...
Please show me
Control array in vb.net

Thanks

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.732 / Virus Database: 486 - Release Date: 7/29/2004
Nov 20 '05 #4
Yes thank you very much,and how about dragdrop event in control array ?
before is Control_DragDrop(index source...)...

Kindly regards,


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #5
Po,
Yes thank you very much,and how about dragdrop event in control array ?
before is Control_DragDrop(index source...)...


I pasted this in the other thread however the discussion did disapeared
them.

The event you take is not important, a trick using this is, make first one
event using the designer for one control and use than one of these 2 methods
for adding handlers to control events.

You have a lot of more possibilities using the control collections (arrays)
it would be endless to write them all.

I hope that one of those helps you?

Cor

Using a self made table
\\\ needs two buttons and a label on a form
Dim btnArea As Button() = New Button() {Button1, Button2}
For Each btn As Button In btnArea
AddHandler btn.MouseLeave, AddressOf Button_MouseLeave
Next
Private Sub Button_MouseEnter(ByVal sender As Object, _
ByVal e As System.EventArgs)
Me.Label1.Text = DirectCast(sender, Button).Name
End Sub
///
And the one I like the most using control.collection
\\\
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
doset(Me)
End Sub
Private Sub doSet(ByVal parentCtr As Control)
Dim ctr As Control
For Each ctr In parentCtr.Controls
AddHandler ctr.LostFocus, AddressOf meLostFocus
AddHandler ctr.GotFocus, AddressOf meGotFocus
doSet(ctr)
Next
End Sub
Private Sub meLostFocus(ByVal sender As Object, _
ByVal e As System.EventArgs)
last = DirectCast(sender, Control).Name
End Sub
Private Sub meGotFocus(ByVal sender As Object, _
ByVal e As System.EventArgs)
DirectCast(sender, Control).Text = last
End Sub
///

Nov 20 '05 #6

Yes thank you very much,I hop see again,
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: The Mess | last post by:
I would like to pass a Control array of OptionButtons that I created at run time to a Sub. Say I have Opt(0), Opt(1)......Opt(5) as OptionButtons, is there a way to pass Opt to a function and...
3
by: Mani | last post by:
Hi, can anyone help me on how to create a control array in C++ builder like we create in VB. I have another question regarding controls. I want to clear a group of text boxes in the form on a...
10
by: James McGivney | last post by:
I have a project in ASP.NET using C#. I have a large number of Button Controls and a large number of ImageButton Controls. It would be convienent if I could refer to a specific control by it's...
3
by: Mark Broadbent | last post by:
In VB6 (using visual studio) it was possible to create a control array at design time by simply adding the control (e.g. textbox) and renaming it to what would become the first element e.g. ...
6
by: chxant | last post by:
Hi, I want to use a parameter in a control name. Something like this: i=1; (CheckBox + i).ID="test"; Is this possible?
4
by: bienwell | last post by:
Hi all, Data displayed on the datalist control is bound by the column name of the dataset like this : <%# DataBinder.Eval(Container.DataItem, "title")%> Could I use an element of the array...
2
by: George | last post by:
Is there a fast way to transfer an Excel range to an array? Example: Excel range is E2:E300 Dim person() as string Thanks, George
14
by: Jim Burns | last post by:
I just started with vb.net and I don't understand why there are no control arrays. what replaced them. I was trying to do drag and drop(What happened with that) and it looked like with no control...
6
by: Rich | last post by:
Hello, I have an application that contains several checkboxes. I originally created this app in VB.Net 2003 and upgraded the app to VB.Net 2005. I understand the vb2005 supports control...
9
by: =?Utf-8?B?VG9tbXkgTG9uZw==?= | last post by:
I don't know if the following is what you are looking for, but to me what you described was using a control array. If you were using vb6 that would be easy, the following articles hopefully...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.