Questions tagged [eventargs]

Represents the base class for classes that contain event data, and provides a value to use for events that do not include event data.

Represents the base class for classes that contain event data, and provides a value to use for events that do not include event data.

This class serves as the base class for all classes that represent event data. For example, the System.AssemblyLoadEventArgs class derives from EventArgs and is used to hold the data for assembly load events. To create a custom event data class, create a class that derives from the EventArgs class and provide the properties to store the necessary data. The name of your custom event data class should end with EventArgs.

http://msdn.microsoft.com/en-us/library/system.eventargs(v=vs.110).aspx

164 questions
0
votes
1 answer

How use MouseEventArgs in timertick?

private void timer1_Tick(object sender, EventArgs e) { MouseEventArgs m=e as MouseEventArgs; if (m.Button == MouseButtons.Right) { MessageBox.Show("dfgdf"); } } It dont work How can I do it ?
kdr_81
  • 55
  • 8
0
votes
3 answers

How to get click eventargs when setting onclick from server-side?

I'm trying to open a div like a popup, but having it centered at the spot where the mouse was when it triggered the onclick event. In order to get the mouse position, I've been following this…
matthew_360
  • 5,901
  • 9
  • 32
  • 40
0
votes
3 answers

Does the OnNavigatedTo() event know who navigated to it?

If I have to, I will pass an arg to a page when I navigate to it, but is it necessary - is there a way to know which page called Navigate() without doing this?
0
votes
1 answer

RoutedEventArgs and AllFramesEventArgs

I am trying to call a function whose parameters are object sender and RoutedEventsArg e. I need those parameters since I have created a button on the main window related to this function and when I click the button it links to my function. …
user1773489
  • 45
  • 10
0
votes
1 answer

Event-Delegate Error publishing from BackgroundWorker

I have an interface, IDataQuery which has an Event to nofity listeners when data loading is progressing and complete. The loading is done via a BackgroundWorker, and fired appropriately, in subclasses of IDataQuery. public interface IDataQuery :…
Stealth Rabbi
  • 10,156
  • 22
  • 100
  • 176
0
votes
1 answer

What is the purpose of removing the accessibility modifier of a method?

I'm reading Petzold's free (.PDF) WP7 book, and he says that he always changes "EventArgs e" to "EventArgs args" in event handlers (which makes sense to me, as "e" sometimes conflicts with what I want to name the Exception object); but he also says…
0
votes
4 answers

Should I be using multiple events or a more verbose eventargs class?

My program is receiving data on a serial port, after the data is received it can be interpreted in one of eight different ways. If I want to trigger an event after the data is received, should I use one event and use something like an enum in my…
NominSim
  • 8,447
  • 3
  • 28
  • 38
0
votes
0 answers

Calling a controls event handler

I decided to try a third-party's implementation of the DataGridView, specifically for the purpose of taking advantage of hierarchical grids, i.e. "Grid within a grid" functionality. While this is working out fairly well, I noticed some of the…
B L
  • 1,572
  • 1
  • 14
  • 26
-1
votes
0 answers

EventArgs' does not contain a definition for 'RowIndex C# dataGridView1

Is there any solution to the problem described below C# dataGridView1 'EventArgs' does not contain a definition for 'RowIndex' eventargs does not contain a definition for rowindex enter image description here textBox1.Text =…
-1
votes
2 answers

Why there is list of changes in observable collection event args?

I'm trying to understand why there are two list properties NewItems and OldItems while you can only add or remove single item at a time? private void InternalCollectionChanged(object sender, NotifyCollectionChangedEventArgs args) { var changes =…
-1
votes
1 answer

Why is there an error when i change argument of "EventArgs" to "FormClosingEventArgs"

In Program.cs, Argument EventArgs changed to FormClosingEventArgs private void Exit_Click(object sender, FormClosingEventArgs e) { } In Program.Designer.cs, Change in Program.cs lead to an error at Line.9 private void InitializeComponent() …
CosMik
  • 51
  • 4
-3
votes
2 answers

c# Use enum as Event args

How to use an enum as Event Args to make an event? This code doesn't works public static event EventHandler MyHandler public enum Status : EventArgs { ON, WAIT, OFF }
Gianluca Demarinis
  • 1,964
  • 2
  • 15
  • 21
-3
votes
1 answer

How can i serialize EventArgs in c# with binaryFormatter

I have a form, and I need to save the actions made on the control's form has that. For this I have something like this:   [NonSerialized()] public EventInfo evento; public TimeSpan timeToWait; [NonSerialized()] public Control sender; public…
-4
votes
1 answer

VB.NET: Creating an event with members

Currently I have defined an event like this: Public Event SoundCompleted(ByVal uGUID As String, ByVal uPath As String, ByVal uStatus As Integer) I would like to ask how I can put all these 3 variables into one variable as Microsoft does with the…
tmighty
  • 10,734
  • 21
  • 104
  • 218
1 2 3
10
11