Thanks for the quick response Herfried,
What I was looking for was a VB equivalent of this C# snippet. VB does
not allow testing the delegate for a handler. It assumes you want to
raise the event.
In hindsight, all it seems to do is not raise the event if no handler is
present. May not be worth the effort...
C#-------
public event QueryShowTheDra gCursorEventHan dler
QueryShowTheDra gCursor;
protected virtual void
OnQueryShowTheD ragCursor(Query ShowTheDragCurs orEventArgs e)
{
//If handler present then raise the event
if(QueryShowThe DragCursor != null)
QueryShowTheDra gCursor(this, e);
}
VB-----
Protected Overridable Sub OnQueryShowTheD ragCursor(ByVal e As
QueryShowTheDra gCursorEventArg s)
If (Not QueryShowTheDra gCursor Is Nothing) Then
RaiseEvent QueryShowTheDra gCursor(Me, e)
End If
End Sub
Thanks for your time,
Doug
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!