I've started moving in to more advanced VB and I am presently having a look at event handling. I have tried to find some good resources on Google but event handling in VB.NET doesn't seem to be the stuff that people write about.
On of my main questions is about the difference in event handling between C# and VB. Is it my perception or is event handling in VB a lot more basic
I would appreciate it if anyone could point me in the direction of a good web resource or a book on event handling in VB.
Thanks
jjrdk

Good articles on event handling in VB.NET
Lazarus Darkeyes
The fundamental event handling mechanism between VB.NET and C# are the same. However there are major syntax differences. For example VB supports WithEvents declaration.
Imports System.Windows.Forms
Class Form1
Inherits Form
Friend WithEvents Button1 As Button
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
End Class
This example shows Button1's click event is automatically hooked up with the function.
You can also manually hook up events in VB by using AddHandler keyword
Class foo
Event MyEvent()
End Class
Module Module1
Sub Main()
Dim x As New foo
AddHandler x.MyEvent, AddressOf EventHandler
End Sub
Sub EventHandler()
End Sub
End Module
There are some good articles on event handling in VB.NET as well. For example check out
http://www.panopticoncentral.net/archive/2004/08/03/1536.aspx
Ting
Obsidian
All of this may work well in a closed program, but if it is to be possible for developers to change it it becomes messy (IMHO).
Quite specifically I am thinking of a web application using the new ICallbackEventHandler interface. In order for this to perform event handling you must hard code the event processing into the RaiseCallbackEvent function. Whereas if VB supported return values for event handlers you could have the RaiseCallbackEvent function trigger an event and return the resulting code to the web page (as is possible in C#).
jjrdk
Naser
My question now is has this been rectified with the final release of VB.NET 2005
jjrdk
Hunter420
this.mnuConnect.Click += new System.EventHandler(this.MnuConnectClick);
just to be clear, "MnuConnectClick" is the void(or Sub) which the program calls when a user clicks the menu item(which is why that is what goes in the EventHandler parameter)