473,405 Members | 2,154 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,405 software developers and data experts.

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
3 4410
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Colin Young | last post by:
I have a UserControl that contains a calendar control. The calendar is not raising events (month navigation, date selections, etc.). I've checked that the OnSelectionChanged event has a handler...
0
by: Scott McChesney | last post by:
I have a problem I hope you folks can help me with. I have an application that is using a tab-based interface, with the ability for users to drag an item from a ListBox onto the tab control. ...
18
by: Brett | last post by:
What are reasons to create your own events? Why not just call a class method/function instead? Thanks, Brett
5
by: snesbit | last post by:
If a screen is made up of several user controls and those user controls contain various packaged or standard controls such as a grid, how do you raise both standard and custom events from the user...
2
by: Gman | last post by:
Hi, I have created a usercontrol, a grid control essentially. Within it I have a class: clsGridRecord. I have coded the events such that when a user clicks on the grid, say, the events occur on...
0
by: hmm | last post by:
Hi all I have two problems: Problem #1: I'm using a .NET Form with the property 'FormBorderStyle' set to 'None'. The idea is to completely cover the area of that Form with a UserControl. In...
3
by: Dom | last post by:
I'm teaching myself how to write a usercontrol, and how to raise events within the control. Some questions came up. Let's say I the event is called "Flyover", and everybody knows what is meant by...
1
by: Lloyd Sheen | last post by:
I have a user control with two events. I drag it on the page I want to use it. No problem. Execute to show the page and it renders correctly. So far so good. Now back to designer. Click on...
7
by: Christian Cambier | last post by:
Hi, I have a textbox in a web user control. I then add the usercontrol to a web form. I also add a label in the web form. Now, when I press a key in the textbox, i want to display some text...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.