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

How to create event templates using vs.net 2003

hello,

I am trying to write code for form activate event and for an event of an
object.

Generally, you select the object/form from the top combo box in visual
studio ide, and select the event you want to code for from the right combo
box... which would generate a template ready to write code for the event.

I am not able to do this with vs.net 2003
The two top combo boxes in the IDE show only methods and objects that are
already there in the project.. how to get auto-generated template for new
events.

thanks
'Harish
Jan 19 '06 #1
1 1562

harish wrote:
hello,

I am trying to write code for form activate event and for an event of an
object.

Generally, you select the object/form from the top combo box in visual
studio ide, and select the event you want to code for from the right combo
box... which would generate a template ready to write code for the event.
Having all the available events listed in the top right combo is a
feature of the _VB(.NET)_ IDE, as far as I am aware.
I am not able to do this with vs.net 2003
The two top combo boxes in the IDE show only methods and objects that are
already there in the project.. how to get auto-generated template for new
events.


One way to do this in the C# IDE is in the docs under the topic title
'Hooking up to Events'; I reproduce some of it here:
In the Code Editor, IntelliSense can help you hook up methods (event
handlers) to event fields. See the Events Tutorial for more conceptual
information.

When you type the += operator after an event field, IntelliSense
prompts you with an option to press the TAB key. This inserts a new
instance of a delegate that points to the method that will handle the
event.

If you press TAB, then IntelliSense automatically completes the
statement for you and displays the event handler reference as selected
text in the Code Editor. To complete the automatic event hookup,
IntelliSense prompts you to press the TAB key again, to create an empty
stub for the event handler.

Note If your new delegate (created by IntelliSense) references an
existing event handler, then IntelliSense conveys this information in
the ToolTip. You can then modify this reference, as the text is already
selected in the Code Editor. Otherwise, automatic event hook up is
complete at this point.
If you press TAB, then IntelliSense stubs out a method with the correct
signature and places the cursor in the body of your event handler.

Note Use the Navigate Back command (CTRL+-) to go back to the event
hookup statement.


Note also that the automatic naming convention used by MS for event
handlers (objectname_eventname) is disapproved of by some people.

--
Larry Lard
Replies to group please

Jan 19 '06 #2

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

Similar topics

2
by: David Shorthouse | last post by:
I am trying to create a guest book using ASP Server Application Error The server has encountered an error while loading an application during the processing of your request. Please refer to the...
8
by: Mark | last post by:
Hi, I'm looking for some ideas on how to build a very simple Event processing framework in my C++ app. Here is a quick background ... I'm building a multithreaded app in C++ (on Linux) that...
3
by: utterberg | last post by:
If I have an xml that looks something like this: <section> <item> <label>label one</label> <data>123</label> </item> <item> <label>label two</label> <data>456</label>
3
by: Richard Fritzler | last post by:
I was given the task of designing a complete web based document prep system. In simplest terms (using a msword explanation) create a database of merge fields, and a library of templates. Allow the...
4
by: Greg Merideth | last post by:
Is it possible to change the default templates in VS 2003? Everytime I start a new web method project I have to include a ton of version control headers and region tags. It would be handy to be...
11
by: Peter Oliphant | last post by:
Is there any plan to support templates with managed code in the (near) future? For instance, VS.NET 2005... : )
1
by: Richard W | last post by:
I have a very simple web page (ASP.NET) that I am trying to build. On the web page is a checkbox that enables or disables other controls based upon the checked status. However, .NET fails to...
1
by: rmunson8 | last post by:
Using the Beta of VS 2005, I'd like to create a website that will be deployed on a server that has .Net 1.1. I understand how to modify the IIS web site properties to run on .Net 1.1, and I have...
2
by: WRB | last post by:
I can't create a new class in MS Visual studio. THe add new item comes up with categories and templates window. It does not ask for the name of class and open the appropriate editor. I found a...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.