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

AddHandler vs. Handles Clause in VB.NET...

Is there any advantage to using the Handles clause vs. using the AddHandler
to map events?
Jul 21 '05 #1
2 2037
AddHandler can be used at runtime. That's the biggest one for me. There
may be others.

Chris
"Roby2222" <ro******@community.nospam> wrote in message
news:D6**********************************@microsof t.com...
Is there any advantage to using the Handles clause vs. using the
AddHandler
to map events?

Jul 21 '05 #2
This is just different.

Handles is a way to declare that a sub handles a particular events (you can
also have multiple references in the handles clauses).
AddHandler does this at runtime.

I'm using both depending on the situation...

Patrice
--

"Roby2222" <ro******@community.nospam> a écrit dans le message de
news:D6**********************************@microsof t.com...
Is there any advantage to using the Handles clause vs. using the AddHandler to map events?

Jul 21 '05 #3

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

Similar topics

5
by: Marina | last post by:
Hi, I have a component that implements ISupportInitialize, so the code in InitializeComponent is something like: theComponent.BeginInit() ' Set theComponent properties ...
3
by: Nathan Sokalski | last post by:
I am using the AddHandler statement to add a CheckedChanged event handler to a series of RadioButtons that I create in a loop. However, the handler is not being called for a reason I cannot...
3
by: Thiago Arrais | last post by:
I am writing a VS .NET Addin and I need to create menu items (CommandBarButtons) at run-time. I can do that but the event handlers do not work. They are registered using AddHandler (wich was...
2
by: Roby2222 | last post by:
Is there any advantage to using the Handles clause vs. using the AddHandler to map events?
7
by: Jim Hubbard | last post by:
What is the reason for using AddHandler as opposed to simply writing the needed code in the event you are adding a handler to?
5
by: Slim | last post by:
i have a simple page, with one button button1. when click it creates a new button button 2 and adds a event handler to it. but when button 2 is clicked nothing happens, why? Partial Class...
15
by: Nathan Sokalski | last post by:
I have a section of my code that dynamically creates LinkButtons to allow the user to go to the page containing a question they have not answered. The code that creates the LinkButton is called, as...
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
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
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...
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.