473,289 Members | 1,840 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,289 software developers and data experts.

EventArgs



I have two different events firing the same event. How can I get the
type of event that called it (either leave or valuechanged or click)? I
have done this before but I cannot remember how.

*** Sent via Developersdex http://www.developersdex.com ***
Sep 21 '06 #1
1 2307
HI,

Two events firing the same events?

I think you mean the same method that handle two events.

I think this is a design problem why are you using the same method IF you
want to know (and possible handle differentely) what event raised it?

What I would do is refactor it, I will create one method with the common
functionality and one method for each event that do the especifics actions
that you want to differentiate.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"John Sutor" <jp*****@yahoo.comwrote in message
news:uV**************@TK2MSFTNGP05.phx.gbl...
>

I have two different events firing the same event. How can I get the
type of event that called it (either leave or valuechanged or click)? I
have done this before but I cannot remember how.

*** Sent via Developersdex http://www.developersdex.com ***

Sep 21 '06 #2

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

Similar topics

4
by: Steve Amey | last post by:
Hi all I am creating a basic control to perform some tasks, and I want to declare some events to be raised so they can be handled from the form that the control is on. I can create my own Event...
2
by: ZAky | last post by:
Why do I get a System.NullReferenceException for this script? I added the following script to a simple form with a button. <Script> public event EventHandler DoThis; static void Main() {...
8
by: Phill | last post by:
All the event handlers seem to pass an Object and an EventArgs object. If the event doesn't need this info why pass them anyway? It is inefficient.
1
by: Jack Addington | last post by:
I have a 3rd party object that fires an itemchanged event when someone edits some data on a form. This event has a custom eventArgs that has a field called ActionCode. In the code of the event,...
3
by: Amil | last post by:
when i double-click on a button on a form as i am designing the form, the IDE creates a method corresponding to a event assignment as follows: this eventhandler: this.exitToolStripMenuItem.Click...
3
by: Yangtsi River | last post by:
Hi, in any event procudure,there is two paras:sender As Object, e As EventArgs, i copied them-not know what they are about, and my ASPX works. I guess the sender is the control by which I...
3
by: Leslie Sanford | last post by:
I have a hierarchy of message classes. Many times when messages are created/received by a class, an event is generated to let the outside know. Also, the message is passed along when raising the...
2
by: Bob | last post by:
Hi, I'm still new to asp.net and i would like to understand this: "Source As Object, e As EventArgs" <script runat="server"> Sub button1(Source As Object, e As EventArgs) p1.InnerHtml="You...
4
by: Frankie | last post by:
The .NET Framework provides us with built-in event handlers: System.EventHandler and the generic System.EventArgs<TEventArgs> It appears that those built-in event handler delegates are just a...
3
by: Tony | last post by:
Hello! One more thing assume I create an event and an object derived from the eventArgs containing some info about the event. Then create another event also with an object derived from the...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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...

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.