Click here to Skip to main content
15,920,625 members
Everything / EventArgs

EventArgs

EventArgs

Great Reads

by Jon Campbell
How to utilize WCF to allow a single instance of any WPF application without needing mutexes, extra assemblies, or special "hacks".
by patm300e
This article will explain what is needed for a custom event handler to work.
by Shweta Lodha
This tip will talk about how to handle events associated with UI controls in MVVM structure.

Latest Articles

by Jon Campbell
How to utilize WCF to allow a single instance of any WPF application without needing mutexes, extra assemblies, or special "hacks".
by patm300e
This article will explain what is needed for a custom event handler to work.
by Shweta Lodha
This tip will talk about how to handle events associated with UI controls in MVVM structure.

All Articles

Sort by Score

EventArgs 

18 May 2017 by Jon Campbell
How to utilize WCF to allow a single instance of any WPF application without needing mutexes, extra assemblies, or special "hacks".
28 Jun 2018 by F-ES Sitecore
The parser has an event (DataReceived) that no-one is subscribed to. The only thing that subscribes to that event is the DataReceivedEventSubscriber, but it subscribes to the event of an instance of CurrentDataDataRespParser that is internal to itself, so the only time that event is going to...
26 Mar 2023 by Graeme_Grant
If you want to pass the event from the UserControl to a parent container, like a Form, then you need to: 1. expose either a Method to a delegate (a method or function to call from within the UserControl) or 2. add a public Event property to the...
16 Oct 2015 by phil.o
In InitializeComponent() method (in .designer.cs file), add:txtCL_VL_LA.Enter += SetLAO;txtCL_FN_LA.Enter += SetLAO;txtCL_LN_LA.Enter += SetLAO;txtCL_VL_LA.Leave += SetENG;txtCL_FN_LA.Leave += SetENG;txtCL_LN_LA.Leave += SetENG;You may have to be careful as to where you put...
10 Nov 2017 by Patrick Skelton
It seems the solution is this: Handle Drag Events My code now is...
7 Dec 2017 by Shaynec
Hi, I've run into an issue that has me scratching my head and I'm hoping somebody has experienced a similar issue... I have a user control that has a custom event handler. When adding a handle to this event from a separate winforms project, visual studio crashes with the below exception, ...
15 Oct 2015 by CeebLaj Thoj
Hi,I want to convert these two method into C# but I don't know how to keep the event handles to keep these two method working in C#.VB.NET Code:Private Sub SetLAO(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCL_VL_LA.Enter, txtCL_FN_LA.Enter,...
17 May 2016 by Member 12529798
Here is my code:Button choice1Button1 = FindViewById (Resource.Id.choice1Button1); choice1Button1.Click += delegate(object sender, System.EventArgs e) { SetContentView (Resource.Layout.Event3); }; Button...
10 Apr 2017 by OriginalGriff
"Events are a special kind of multicast delegate that can only be invoked from within the class or struct where they are declared." - MSDN. What that means is that the signature of a delegate that can be used as an event must match that of all events: an object sender, and a EventArgs derived...
10 Nov 2017 by Patrick Skelton
I have a ListBox that displays the files in a real physical directory. Sometimes, no directory has been selected, and in this case the ListBox remains blank. I have code that allows users to copy files into the directory being displayed. When I do this, I get the correct mouse icon displayed,...
28 Jun 2018 by Nishikant Tayade
Whenever data arrived in the buffer,I want to raise an event. I tried the following thing,but it is not giving call to the event handler method. Here is the code: What I have tried: public class CurrentDataDataRespParser { //public Action DataReceived; public...
28 Jun 2018 by johannesnestler
everything Looks good in principle. so does your subscriber still live? Where is the code when you create the subscriber? - this code is of course nonsense: public virtual void onDataReceived(byte[] pBuffer) { DataReceivedEventSubscriber subscriber = new DataReceivedEventSubscriber(); ...
13 Jul 2020 by vishalkumar_86
We Have created the the eventwatcher functionality which is track the window open event its works when open the any first file with same application but when i open it the second file then that time it will not fire. for e.g. i have two excel...
18 Aug 2021 by Admin BTA
So I am able to subscribe to a single event and perform functions on that one event. However, I want to be able to generalize the idea to multiple different events. For example, instead of "gulfstream" I want to be able to do this on "boeing747"...
18 Aug 2021 by OriginalGriff
Events have two parameters: an object called sender and an EventArgs called e The first one of these is the class instance that raised the event: for a Form.Load event that would be the form instance that is about to be displayed. For a...
25 Mar 2023 by Richard MacCutchan
An unhandled exception of type 'System.InvalidCastException' occurred in Ultra30007810.exe You have an error in your code, but since we cannot see the source we cannot help, beyond repeating what the error message states.
16 Oct 2023 by Richard Deeming
You haven't provided any way for the user to select a row. Therefore, the "selected row changed" event is never going to fire! Either set the AutoGenerateSelectButton[^] property to true, or add a CommandField[^] to the grid with the...
11 Mar 2016 by patm300e
This article will explain what is needed for a custom event handler to work.
16 Oct 2023 by M Imran Ansari
Your code seems good but you can verify the following points: 1. If your GridView is placed inside an UpdatePanel, ensure that the GridView is configured as a PostBack trigger for that UpdatePanel. This is important for Ajax-enabled pages. 2. If...
17 Nov 2014 by Shweta Lodha
This tip will talk about how to handle events associated with UI controls in MVVM structure.
10 Apr 2017 by Member 13118954
Hello. I've this code in my .NET project: public delegate void CtrlVisible(Boolean v); inside of a class which doesn't implements EventArgs. I use it in this way: rs.ctrlVisible += new clsReportStatus.CtrlVisible(rs_ctrlVisible); where rs_ctrlVisible is: public event CtrlVisible...
25 Mar 2023 by Mark Allan Wright
This is the code I have a RectangleShape on the Usercontrol called Flng1. This works when I use OnClick(EventArgs.Empty) but I need to have a Button2 action happen so the click won't work. Hope this helps. Private Sub Flng1_MouseUp(sender As...
30 May 2016 by Member 12555296
I have create a small class CountDown , that contains a timer.Class is very simple : receive time target, and start a CountDown with a timer.When target is reached, my personal event fireusing System;using System.Collections.Generic;using System.Linq;using System.Text;using...
30 May 2016 by Sergey Alexandrovich Kryukov
Main wrong thing here is using System.Windows.Forms. You cannot expect anything good from this kind of a timer. As far as I can see, you need more or less periodic behavior, to see how the label shows count down time. With this timer, don't even dream about it, even if sometimes you got an...
25 Mar 2023 by Mark Allan Wright
I have a RectangleShape, That I named Flng1, on a usercontrol and I need the MouseDown Event to work for the usercontrol to the form I place it on. It seems I can make the Click event work with this OnClick(EventArgs.Empty) but when I use this...
25 Oct 2023 by ashwini gaikwad 2021
I have 1 grid in ASP.NET and I am trying to fetch the data when I click any row to update or delete, but the event is not getting called when I click on grid row. What I have tried: protected void GridView1_SelectedIndexChanged(object sender,...