M
Mac via DotNetMonster.com
Hi all,
I have created my own class DateBox which inherits from the System.Windows.
Forms.TextBox class. In this DateBox class I catch the validating event so
that I can run some code to validate and format the date that was entered on
the form.
I catch this event as follows:
Private Sub DateBox_Validating(ByVal sender As Object, ByVal e As _
System.ComponentModel.CancelEventArgs) Handles MyBase.Validating
But I need to know the current instance of the DateBox because I would like
to set the toolttip for the current instance of the DateBox to be the long
date for the short date entered. MyBase is no good for this.
If there anyway to reference the current instance of the textbox? I think I
will have to do everything I want in a user control rather than an inherited
class.
regards,
Mac
I have created my own class DateBox which inherits from the System.Windows.
Forms.TextBox class. In this DateBox class I catch the validating event so
that I can run some code to validate and format the date that was entered on
the form.
I catch this event as follows:
Private Sub DateBox_Validating(ByVal sender As Object, ByVal e As _
System.ComponentModel.CancelEventArgs) Handles MyBase.Validating
But I need to know the current instance of the DateBox because I would like
to set the toolttip for the current instance of the DateBox to be the long
date for the short date entered. MyBase is no good for this.
If there anyway to reference the current instance of the textbox? I think I
will have to do everything I want in a user control rather than an inherited
class.
regards,
Mac