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.

Overrides and Events basic question.

This should be a basic question.

In VB.NET in the two drop downs over the source code for a form you
can get a list of the events and overrides for that form. In VC++ in
the properties window you can get the events and overrides. But for
some reason I can not seem to find the list of events and overrides
for a C# form, if I do this. the Intelisense will show them but as for
being able to select it and have the IDE pop the function or override
in like it does in VB.NET and C++ I have not figured out yet.

Thanks, Ed,
Nov 15 '05 #1
5 1672
ECVerify.com <go****@gencode.com> wrote:
This should be a basic question.

In VB.NET in the two drop downs over the source code for a form you
can get a list of the events and overrides for that form. In VC++ in
the properties window you can get the events and overrides. But for
some reason I can not seem to find the list of events and overrides
for a C# form, if I do this. the Intelisense will show them but as for
being able to select it and have the IDE pop the function or override
in like it does in VB.NET and C++ I have not figured out yet.


If you go to the designer view, then the properties tab, there's an
event icon there.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #2
Cor
Hi Ed,

You find them in the property window under the flash in the Top

Cor

In VB.NET in the two drop downs over the source code for a form you
can get a list of the events and overrides for that form. In VC++ in
the properties window you can get the events and overrides. But for
some reason I can not seem to find the list of events and overrides
for a C# form, if I do this. the Intelisense will show them but as for
being able to select it and have the IDE pop the function or override
in like it does in VB.NET and C++ I have not figured out yet.

Nov 15 '05 #3
In the proprties grid,click on the thing that looks like a Lightning bolt.
You'll see all fo the events there....just double click on one of them and
it'll add the declaration and handler shell, all you need to do is add the
code you want to execute when the event is raised.

HTH,

Bill
"ECVerify.com" <go****@gencode.com> wrote in message
news:20**************************@posting.google.c om...
This should be a basic question.

In VB.NET in the two drop downs over the source code for a form you
can get a list of the events and overrides for that form. In VC++ in
the properties window you can get the events and overrides. But for
some reason I can not seem to find the list of events and overrides
for a C# form, if I do this. the Intelisense will show them but as for
being able to select it and have the IDE pop the function or override
in like it does in VB.NET and C++ I have not figured out yet.

Thanks, Ed,

Nov 15 '05 #4
Hi Ed,

"ECVerify.com" <go****@gencode.com> wrote in message
news:20**************************@posting.google.c om...
This should be a basic question.

In VB.NET in the two drop downs over the source code for a form you
can get a list of the events and overrides for that form. In VC++ in
the properties window you can get the events and overrides. But for
some reason I can not seem to find the list of events and overrides
for a C# form, if I do this. the Intelisense will show them but as for
being able to select it and have the IDE pop the function or override
in like it does in VB.NET and C++ I have not figured out yet.


The C# IDE has the events tab ("lightning bolt" on the property tool
window), which is better than the drop-downs (IMO) for a few reasons. The
events tab allows you to:

1.) Auto-create an event handler procedure via double-click, or
2.) Type what you want the event handler method to be named, or
3.) Choose from a drop-down list of methods that can handle the
event.

#3 is great for using the same event handling procedure for multiple
controls.

To add an override stub:

1.) Go to Class View.
2.) Choose the base class/ base member you want to override.
3.) Opposite-click and choose Add -> Override from the menu.

If you have VS.NET 2003 there are some other options as well. To wire up
an event handler right from the code window, type "<reference name>.<event
name>+=". A tooltip will pop up telling you to press TAB to insert a new
event handler, TAB again to create the stub. To override a method, just type
"override" followed by SPACE. A list of methods you can override will
appear. Choose a method to create the stub.

Regards,
Dan
Nov 15 '05 #5
"Daniel Pratt" <ko******************@hotmail.com> wrote in message news:<#K**************@TK2MSFTNGP10.phx.gbl>...
Hi Ed,

"ECVerify.com" <go****@gencode.com> wrote in message
news:20**************************@posting.google.c om...
This should be a basic question.

In VB.NET in the two drop downs over the source code for a form you
can get a list of the events and overrides for that form. In VC++ in
the properties window you can get the events and overrides. But for
some reason I can not seem to find the list of events and overrides
for a C# form, if I do this. the Intelisense will show them but as for
being able to select it and have the IDE pop the function or override
in like it does in VB.NET and C++ I have not figured out yet.


The C# IDE has the events tab ("lightning bolt" on the property tool
window), which is better than the drop-downs (IMO) for a few reasons. The
events tab allows you to:

1.) Auto-create an event handler procedure via double-click, or
2.) Type what you want the event handler method to be named, or
3.) Choose from a drop-down list of methods that can handle the
event.

#3 is great for using the same event handling procedure for multiple
controls.

To add an override stub:

1.) Go to Class View.
2.) Choose the base class/ base member you want to override.
3.) Opposite-click and choose Add -> Override from the menu.

If you have VS.NET 2003 there are some other options as well. To wire up
an event handler right from the code window, type "<reference name>.<event
name>+=". A tooltip will pop up telling you to press TAB to insert a new
event handler, TAB again to create the stub. To override a method, just type
"override" followed by SPACE. A list of methods you can override will
appear. Choose a method to create the stub.

Regards,
Dan

Everyone, thanks....I found it in the class view, but did not notice
that the events were in the designer view with the lightining
bolt...yes the lightining bolt is nice, it is more like the C++
lighting bold I am already used to...thanks for the quick response and
thanks for the detailed response from Dan.
Nov 15 '05 #6

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

Similar topics

3
by: ECVerify.com | last post by:
I posted this earlier but never got a response...so I am trying again **************************** Hey everyone, I have a simple (I hope question) To get the events in C# I can go to the...
4
by: Christopher W. Douglas | last post by:
I am developing a VB.NET app using Visual Studio.NET 2003. VB.NET allows me to create a class with two or more methods that have the same name, as long as they have different (non-optional)...
16
by: Merlin | last post by:
I have created a users control with a text box and button on it, what I want to do is override the usercontrol Keydown events with that of the Text box. What is the correct syntax to accomplish...
4
by: Charles Law | last post by:
In a form, there is a set of events that can be handled. There is also a list of (Overrides). So, for the Closed event, for example, there is an override OnClosed. Where should exit code be...
9
by: Surrealist | last post by:
I need something likes as when I create an event procedure. I can use top-left and top-right dropdown list of code editor to select object and its exposed events respectively. Then, the IDE,...
2
by: Neal | last post by:
Hi All, I have VS 2005 Pro and when inheriting a class in 2003 the drop down combobox at the top of the IDE's text editor showed the overrides + the Events for the class. However in 2005 it just...
8
by: Martin | last post by:
Hi all, I'm trying to make a subclass of the Textbox. One of the things I did there is the following: Protected Overrides Sub OnLeave(ByVal e As System.EventArgs) If Me.DataType = 1 Or...
3
by: A Wieser | last post by:
I created a new Windows Forms Application, with a blank form. The first thing I want to do is override OnPaint, and draw a line across the window. I can't for the life of me figure out how I'm...
4
by: Jonathan Wood | last post by:
I'm building a Web application but this question should be common to all C# applications. When I use a class, and I want to add event handlers or override base class methods, how do I know the...
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
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...
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: 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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.