Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Instantiating Class Objects WithEvents at runtime?

Posted on 2003-03-17
10
Medium Priority
?
209 Views
Last Modified: 2013-11-25
HI,

I have a class that exposes events. Is it possible to dynamically instantiate more than 1 instance of this object (with events) at runtime from an app?
I tried going down the line of creating a collection of the class, but I then can't access the individual objects' events.

any ideas?

Ta
0
Comment
Question by:CD-Softy
  • 4
  • 2
  • 2
  • +1
10 Comments
 
LVL 28

Accepted Solution

by:
AzraSound earned 500 total points
ID: 8154865
Sample here found in ObjArrays.zip that contains two methods to achieve this:

http://www.mvps.org/vb/index2.html?samples.htm
0
 

Expert Comment

by:CleanupPing
ID: 8532160
Hi CD-Softy,
This old question (QID 20553864) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
0
 
LVL 2

Author Comment

by:CD-Softy
ID: 8535453
Moderators please refund and close this Q

I have not found an acceptable answer for this post.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 28

Expert Comment

by:AzraSound
ID: 8535639
What was wrong with the solution I presented?
0
 
LVL 2

Author Comment

by:CD-Softy
ID: 8559253
Please accept my apologies, I have reviewed the statement I made and decided it was unfair to you that I don't give you at least some points for your effort. The reason I can't accept your answer is that my scenario doesn't allow me to use arrays of objects or even collections - sorry. But I thank you for your effort anyway.

MODERATORS - please award AzraSound 25 points of this thread and refund me the rest. Thanx.
0
 

Expert Comment

by:CleanupPing
ID: 8899999
CD-Softy:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 8902111
According to the questioner's last post:

>>MODERATORS - please award AzraSound 25 points of this thread and refund me the rest. Thanx.
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 8957080
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

-->Accept AzraSound's comments as answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

GPrentice00
EE Cleanup Volunteer
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 8957100
AzraSound

I'm just blasting away my appointed chunk of cleanup space, that's naturally a generic post.  I made a program to help me speed up posting and logging in one shot, so its just easier to include these all together.  You can wait another few days, right?

CD-Softy
Moderators don't usually enter threads, you have to post requests in CS to get their attention.
I recommend posting a message in community service linking to this question with a request to reduce the point load to 25, then you can award them to AzraSound yourself.  If you do this before the deadline, you will be able to keep your 100 points, and close the question.

Your decision has been made, I am providing you the way to have it carried out...


0
 
LVL 28

Expert Comment

by:AzraSound
ID: 8957996
GPrentice00,
Completely understandable.  I have no problem waiting.
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month11 days, 14 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question