Link to home
Start Free TrialLog in
Avatar of Egore
Egore

asked on

Adding Activated / Deactivate Event Handlers via IDE

I'm using VS.NET 2003 with C# as my programming language.  When I create a form, I can add most event handlers for it by going to the "Properties" window and clicking the lightning bolt.  However, certain key event handlers don't show up (including "Activated" and "Deactivate").  When I use the Class Viewer I see that the events do exist and I can override OnActivated and OnDeactivate, but I want to add an event handler for Activated / Deactivate, not override the OnActivated / OnDeactivate methods.

Do you know how to add Activated / Deactive event handlers via the IDE so that I won't have to bother hand-coding the declaration and the code to register the method as an event handler?

Thanks,
Alex
ASKER CERTIFIED SOLUTION
Avatar of vbwizardry
vbwizardry
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Egore
Egore

ASKER

That works fine (it's my current solution).  However, I was looking for a way to select the events from a list in the IDE and have them inserted in automatically like all of the events listed under the lightning bolt icon.

Thanks.
What version on .NET do you use. I can see both event's in my IDE.
Avatar of Egore

ASKER

According to the help screen, it's developer environment 2003.

Are you looking in a VB.Net or a C#.Net application?  There is a huge difference in how they allow you to add events (which is actually why I posted this in the C# forum, not the .NET forum).  In VB.Net all events are listed in the code window's drop-down list (just like in VB6), but in C# you have to click the lightning bolt icon on the Properties window and only some of the possible events are listed.
I'm looking in C#. In C# you add events in proprty window. IE: clik on lbolt and it will show you all available events
Avatar of Egore

ASKER

Well crazily enough, you're right.  I'm working on a Pocket PC application and they're not listed in the event list, but I just tried creating a Windows application and they are listed.  Since this is such an obscure issue (only occurs when using the Compact Framework and C#) I doubt anyone will know the solution.

I'm giving you the points since you did mention the solution that I was already using, so its at least a valid way to solve the problem.

Thanks for looking into this!
There are many things in .NET that can be improved on ;)