473,804 Members | 3,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Control array in vb.net

Please show me
Control array in vb.net

Thanks
Nov 20 '05 #1
6 1272


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

I miss it too

"samean" <sa******@hello gsm.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.Ev entName" in a comma-separated list after the word
"Handles" to get similar functionality for event handling - but -

I miss it too

"samean" <sa******@hello gsm.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_DragDro p(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_DragDro p(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_MouseLea ve
Next
Private Sub Button_MouseEnt er(ByVal sender As Object, _
ByVal e As System.EventArg s)
Me.Label1.Text = DirectCast(send er, Button).Name
End Sub
///
And the one I like the most using control.collect ion
\\\
Private Sub Form1_Load(ByVa l sender As Object, _
ByVal e As System.EventArg s) Handles MyBase.Load
doset(Me)
End Sub
Private Sub doSet(ByVal parentCtr As Control)
Dim ctr As Control
For Each ctr In parentCtr.Contr ols
AddHandler ctr.LostFocus, AddressOf meLostFocus
AddHandler ctr.GotFocus, AddressOf meGotFocus
doSet(ctr)
Next
End Sub
Private Sub meLostFocus(ByV al sender As Object, _
ByVal e As System.EventArg s)
last = DirectCast(send er, Control).Name
End Sub
Private Sub meGotFocus(ByVa l sender As Object, _
ByVal e As System.EventArg s)
DirectCast(send er, 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
5926
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 have the function see it as an Array of Optionbuttons? private sub Test(a as Object) is the best I can come up with so far. I would like to test it to verify that it is both an array and an OptionButton. Although I can check it with...
3
8653
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 button click. I am not using any groupbox. how can i determine the control as Editbox and how can i clear that. any help would be appreciated. thanx
10
1801
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 index number, in the same way in which I used a Command Array in VB6. What is the method of assigning and then obtaining a specific unique identified for a control ? Sample code or reference articles would be appreciated. Thanks, Jim
3
6429
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. Name => MyTextbox to Name => MyTextbox(1) you could then copy this control array element and paste back onto form to
6
1632
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
2224
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 (i.e. index=0) which has the name "title" in place of it ? For example:
2
24463
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
1584
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 array I have to write code in for every control? That cant be possible. I looked at the help files and it looks like I can set an event handler but there has to be a better way then typing Handles pic1.click,pic2.click It would be a lot of...
6
3063
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 arrays. Is this correct? If so, I would like to convert my checkboxes to a control array, but without having to recreate them from scratch because their placement was a real pain. Is it possible to go to the property sheet of each checkbox and assign...
9
1423
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 explain using control arrays in .net Hope they help? http://visualbasic.about.com/od/usingvbnet/l/bldykctrlarraya.htm ...
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10578
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10077
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9152
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5522
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.