473,239 Members | 1,552 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,239 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 1558

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: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
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...

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.