The only fact regarding life as being a game, is that it is .Me.
(.if I could sing as I think, I'd be a...?...)
If
it is not somewhere.near and it is not somewhere.far, Then
it is somewhere.Else
..off.topic:
why do you put a full stop (period) in random places? are you posting in some sort of code we (prossibly just me) don't know about?
.it's work in progress and in a.way, blueprints that have to be.dotted.
Structure.
Structure Thoughts_of_the_Day
End Structure
(: .as any thought, it it just a thought and is always more and more defined until not a thought at all, until a...Structure?
For me, this thought is not my thought anymore, it is a doorway to your thoughts, thus enjoy. :)
See if this helps.
Public Class Form1
Public Const cFmtCurrency As String = "##,###,###" ' don't need decimal for the local China currency
Private Sub setCoolHandlersForTextBoxes()
For Each myCoolTextBox In New TextBox() {TextBox1, TextBox2, TextBox3}
AddHandler myCoolTextBox.Validated, AddressOf _myCoolTextBoxes_Validated '// set the event to be handled by each TextBox.
Next
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
setCoolHandlersForTextBoxes()
End Sub
Private Sub _myCoolTextBoxes_Validated(ByVal sender As Object, ByVal e As System.EventArgs)
With CType(sender, TextBox)
If Not .Text = "" AndAlso IsNumeric(.Text) Then .Text = CInt(.Text).ToString(cFmtCurrency) '// Format.
End With
End Sub
End Class
This link might also help.