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

C# IDE question, adding events

Hi,

I'm expierenced with C++ and VB6 and learning C#. I tried some small
application in VB.NET too.

But I'm stuck with the IDE: Say in put a button on a form and I double click
the button. C# generates the declarations for the Click event.

In VB6 and VB.NET (when I'm standing in the button_Click event code) I can
find in the dropdowns on top of the code window the name of the button (left
dropdown) and all events in the right dropdown. When I select an event the
code is generated or the IDE jump to an existing eventhandler.

But in C# I cannot find these handies, in the codewindow the left dropdown
shows one item (application.class) and the right dropdown shows only the
classmembers of the class.

Where is the magic button in C# projects to add eventhandlers like the
double click does on a button? I couldn't find a classwizard either (like
the MFC/C++ wizard).

Thanks,

Rene

btw: I'm using VS.NET 2003


Nov 15 '05 #1
3 1582
Rene <no@spam.nl> wrote:
I'm expierenced with C++ and VB6 and learning C#. I tried some small
application in VB.NET too.

But I'm stuck with the IDE: Say in put a button on a form and I double click
the button. C# generates the declarations for the Click event.

In VB6 and VB.NET (when I'm standing in the button_Click event code) I can
find in the dropdowns on top of the code window the name of the button (left
dropdown) and all events in the right dropdown. When I select an event the
code is generated or the IDE jump to an existing eventhandler.

But in C# I cannot find these handies, in the codewindow the left dropdown
shows one item (application.class) and the right dropdown shows only the
classmembers of the class.

Where is the magic button in C# projects to add eventhandlers like the
double click does on a button? I couldn't find a classwizard either (like
the MFC/C++ wizard).


View the form in the designer, go to properties, and click on the
lightning bolt.

--
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
"Jon Skeet [C# MVP]" <sk***@pobox.com> schreef in bericht
news:MP************************@msnews.microsoft.c om...

Where is the magic button in C# projects to add eventhandlers like the
double click does on a button? I couldn't find a classwizard either (like the MFC/C++ wizard).


View the form in the designer, go to properties, and click on the
lightning bolt.


Thanks Jon, I found that a doubleclick is needed to add it.

I guess here we have a difference here between VB.NET and C# IDE. There is
an advantage in the 'C# way', events are grouped, but adding an event means
I must switch to the form designer, selected the control and then the event.

IMO the VB.NET way is faster and easier (but that is where VB.NET was ment
for) or do I miss something?

Rene
Nov 15 '05 #3
Rene <no@spam.nl> wrote:
Thanks Jon, I found that a doubleclick is needed to add it.

I guess here we have a difference here between VB.NET and C# IDE. There is
an advantage in the 'C# way', events are grouped, but adding an event means
I must switch to the form designer, selected the control and then the event.

IMO the VB.NET way is faster and easier (but that is where VB.NET was ment
for) or do I miss something?


Personally I don't use the designer much anyway - I write my production
GUI code by hand, on the grounds that it's then more maintainable. At
that stage, I write the handlers myself as methods and add the event
handlers to the appropriate objects in code. However... yes, if you're
using the designer, the VB.NET way is faster. I don't know for sure,
but I believe that in Whidbey (the next version of VS.NET) C# will get
the same functionality as VB.NET in this area.

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

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

Similar topics

4
by: JJ | last post by:
Hi, Ok I was reading an old ASP 3.0 Book and I noticed that when designing web applications. Everything that us windows form and vb programmers would do was to put all functions relating to a...
4
by: Patrick.O.Ige | last post by:
I have a CheckBoxList in a DataList and i'm trying to get item Selected after doing a postBack. I have set my CheckBoxlist AutoPostBack="True" Any ideas what 'm doing wrong? It seems not to...
4
by: Colin McGuire | last post by:
Hi again, thanks everyone for your previous help. But having resolved past problems, I'm moving on to new problems :( This one is a simple winforms application with two buttons, named Button1...
10
by: jack | last post by:
Hi guys, I am working on a project which requires an implementation of discrete event simulation in C using linked lists. I would greatly appreciate if someone could provide with some sources...
4
by: DeveloperX | last post by:
I'm having a play with EventHandlerList but the documentation is a bit ropey and I can't find any decent examples. It also doesn't seem to do what I was led to believe it would. I was under the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.