JB,
In the English language I know this is considered rude, very rude --> "I
think you missed the point."
You need to remain courteous when asking for assistance, or get clever when
you write down your comments! ;-)
My reply to the comment:
Dim options As System.Text.RegularExpressions.RegexOptions = _
System.Text.RegularExpressions.RegexOptions.None
Dim regex As System.Text.RegularExpressions.Regex = _
New System.Text.RegularExpressions.Regex("\s(a(\w)\2).+((\scl).+(own))",
options)
Dim Matches As System.Text.RegularExpressions.MatchCollection _
= regex.Matches(MyReply.Text)
Dim Result As String = Matches.Item(0).Groups(1).Value _
& Matches.Item(0).Groups(4).Value _
& Matches.Item(0).Groups(5).Value
System.Windows.Forms.MessageBox.Show(Result.ToUpper, "What I think of the
comment - I think you missed the point.")
My Reply to the post
First of all, I'm not writing your program for you, the example I presented,
albeit does not perform the desired results, does demonstrate the methods in
which you can achieve your results. Secondly, I don't know if you have
noticed, but, the event handler has an argument called sender, this
represents the object that raised the event, an object like a textbox, that
includes a name attribute. With this knowledge you no longer have to provide
a "workaround" with extra controls sucking up memory space. So, in this case
you have no reason to use Me.ActiveControl.Name! I have a simple form with
three textboxes and one button. Each of the Validation handlers is attached
to the same routine, when it fires it converts the object to a generic
control and gets the name. Use it in a select statement, use the gettype or
typeof to perform specific validation on your controls.
Private Sub MyTextboxes_Are_Validating(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) _
Handles TextBox1.Validating, TextBox2.Validating, TextBox3.Validating
Console.WriteLine("The control that is currently validating is: {0}",
CType(sender, Control).Name)
End Sub
You should be doing something SIMILAR to
> Jared,
>
[quoted text clipped - 69 lines]
>> >
>> > JB