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

Common Events

Lee


I can see that vb.net has the ability to have multiple controls
(consumers?) share in a single event, much like I do now in Delphi.

Looks like the use of delegates? in vb.net is involved.

How would I go about forcing multiple buttons to react to the same
button click? In Delphi, you just create a procedure with a matching
signature and assign it to the xxx.OnClick event, etc of object you
subscribe to the event. You can also do it in the object inspector.

Can someone provide a sample or link for accomplishing this via vb.net?

Thank you,

--
Warm Regards,

Lee
Nov 21 '05 #1
3 964
Lee

Never mind, google is my friend.

--
Warm Regards,

Lee
Nov 21 '05 #2
Lee,

To answer your qeustion for searchers in Google who find your message.

Add handlers using
\\\
AddHandler mycontrol.theevent, addressof Myprocedure
///

This can be simple done in a loop.

Cor
Nov 21 '05 #3
Lee
Cor Ligthert enlightened me by writing:
Lee,

To answer your qeustion for searchers in Google who find your message.

Add handlers using
\\\
AddHandler mycontrol.theevent, addressof Myprocedure
///

This can be simple done in a loop.

Cor


Thanks, Cor. I was just hooking up the events by adding the events to
the Handles section of the event signature through IDE.

Eventually, I would have needed to do it in code as well. Thanks for
the tip...
--
Warm Regards,

Lee
Nov 21 '05 #4

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

Similar topics

4
by: Sean Connery | last post by:
I know I can merge a child forms menu into the MDI parent's mainmenu, but I would also like to listen for common events fired from the mainmenu that might be of interest to any child forms. Is...
4
by: jcrouse | last post by:
I am trying to share mouse events (click, up, down, move and the such) for 30 different label controls: Here is my code: Dim myLabel as Label Private Sub lblP1JoyUp_MouseDown(ByVal sender...
3
by: HL | last post by:
The requirement is to send some information to other objects. The objects to whom the information has to be sent is not available at compile time. The names of the types (objects) will be provided...
13
by: goodoldave | last post by:
Hey everyone, I need some advice concerning Interfaces and delegates. I would like to define a delegate inside of an interface (I know a delegate is a class but hear me out) Here is a...
30
by: Burkhard | last post by:
Hi, I am new to C# (with long year experience in C++) and I am a bit confused by the language construct of events. What is it I can do with events that I cannot do with delegates? At the moment...
2
by: MuZZy | last post by:
Hi, Consider i have this code: // --------------------------------------------------------------------- public delegate void DoSearchEventHandler(Form f, DoSearchEventArgs e); public class...
0
by: luc.saffre | last post by:
Hello, I thought that I should ask here for comments on a blog entry that I wrote some weeks ago. I am sure that other people have been thinking about this, but I didn't yet find them. The...
6
by: Smithers | last post by:
Just looking to compile a list of "all the ways to implement events". I'm NOT looking to get into the merits or mechanics of each in this thread... just want to identify them all - good, bad, and...
0
by: priyamtheone | last post by:
Scenario This is a non-MDI windows application. I have a home form containing a panel named Panel1 and two buttons btnForm1 and btnForm2. Clicking btnForm1 and btnForm2 opens up Form1 and Form2...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.