467,868 Members | 1,331 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,868 developers. It's quick & easy.

Raising events for UserControl arrays

I am working in VB5.
How do you mimmick Visual Basic's putting an Index argument at the front of
the variables passed to an event when making your own control? This sounds
kind of confusing so I'll simplify it.
Say I have made my own UserControl and I have an event for it. Someone uses
my control. In fact he makes a control array of it. When an event is fired,
how do you tell for which instance of the control.
Could someone give me an example of how this is done?
Thanks

Jul 17 '05 #1
  • viewed: 4280
Share:
3 Replies
On Sun, 3 Apr 2005 11:38:52 -0400, "The Mess" <em***@none.com> wrote:
I am working in VB5.
How do you mimmick Visual Basic's putting an Index argument at the front of
the variables passed to an event when making your own control? This sounds
kind of confusing so I'll simplify it.
Say I have made my own UserControl and I have an event for it. Someone uses
my control. In fact he makes a control array of it. When an event is fired,
how do you tell for which instance of the control.
Could someone give me an example of how this is done?


Best you run up a very small test App

- you will find that the UserControl knows nothing about its Index
- and does not need to when Raising Events
Jul 17 '05 #2
I only work with vb 6.0, but can u set a read-only property for the index?
Read the property, Mickey Mouse stuff :)
Egghead
"The Mess" <em***@none.com> wrote in message
news:C6*****************@news20.bellglobal.com...
I am working in VB5.
How do you mimmick Visual Basic's putting an Index argument at the front
of
the variables passed to an event when making your own control? This sounds
kind of confusing so I'll simplify it.
Say I have made my own UserControl and I have an event for it. Someone
uses
my control. In fact he makes a control array of it. When an event is
fired,
how do you tell for which instance of the control.
Could someone give me an example of how this is done?
Thanks

Jul 17 '05 #3
Thanks for the answers. Please disregard request. It was a stupid mistake (:

"The Mess" <em***@none.com> wrote in message
news:C6*****************@news20.bellglobal.com...
I am working in VB5.
How do you mimmick Visual Basic's putting an Index argument at the front of the variables passed to an event when making your own control? This sounds
kind of confusing so I'll simplify it.
Say I have made my own UserControl and I have an event for it. Someone uses my control. In fact he makes a control array of it. When an event is fired, how do you tell for which instance of the control.
Could someone give me an example of how this is done?
Thanks

Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Colin Young | last post: by
reply views Thread by Scott McChesney | last post: by
18 posts views Thread by Brett | last post: by
3 posts views Thread by Dom | last post: by
1 post views Thread by Lloyd Sheen | last post: by
7 posts views Thread by Christian Cambier | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.