How to pass args for events

S

spaulsamin

Hi

Please let me know how to do the following

here, i have property and event in a class, now i want to fire the
event from the property when i get value, how to pass args for the
below event

would you FILL UP THE (?) MARK .

Property required() As Boolean
Get
Return m_required
End Get
Set(ByVal Value As Boolean)
m_required = Value
If Value = True Then
EVENTVALIDATING( ? , ? )
End If
End Set
End Property

Private Sub eventvalidating(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Validating
If Me.Text = "" Then
e.Cancel = True
showerr("Only Alphabets")
Me.Focus()
End If
End Sub

Thanks
 
R

rowe_newsgroups

Hi

Please let me know how to do the following

here, i have property and event in a class, now i want to fire the
event from the property when i get value, how to pass args for the
below event

would you FILL UP THE (?) MARK .

Property required() As Boolean
Get
Return m_required
End Get
Set(ByVal Value As Boolean)
m_required = Value
If Value = True Then
EVENTVALIDATING( ? , ? )
End If
End Set
End Property

Private Sub eventvalidating(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Validating
If Me.Text = "" Then
e.Cancel = True
showerr("Only Alphabets")
Me.Focus()
End If
End Sub

Thanks

Since you're talking about calling the base object's Validating event,
you could do what the base object does and just call it's OnValidating
method:

MyBase.OnValidating(New
System.ComponentModel.CancelEventArgs())

Thanks,

Seth Rowe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top