If you have any compliments or complaints to MSDN Support, feel free to contact [email protected] thanks.format for the telephone could be telephone of any country..example if it is uk..people can enter 44 772345678 or 0044 772345678 or 0772345678..this should be accepted or if people enter just 772345 and stop it should give error message because phone number cannot be this small Hi Leixi85, As far as I know, if you want to validate phone number format, you need add a specify format. Text = Format Currency("123456789", , , , vb True) If Me.
When users enter data into your application, you may want to verify that the data is valid before your application uses it.
You may require that certain text fields not be zero-length, that a field be formatted as a telephone number or other type of well-formed data, or that a string not contain any unsafe characters that could be used to compromise the security of a database.
Or perhaps you simply didn't allow for a particular rare circumstance in your code. NET Framework offers a robust set of tools for dealing with these unexpected problems.
In this chapter, we'll look at two facets of dealing with problems in . First, we'll demonstrate the programming that you can do to handle errors, allowing the user to make corrections when something goes wrong.
Text = 0 End Sub Private Sub XText Box_Leave(By Val sender As Object, By Val e As System.
Control 'changed on 07/09/2014 End Sub Private Sub XText Box_Text Changed(By Val sender As System.
Font = Value End Set End Property Protected Overrides Sub On Create Control() My Base.
Text Align = Value End Set End Property Private Sub XText Box_Enter(By Val sender As Object, By Val e As System.
The code is as follows: Public Class XText Box Inherits System. Regular) Public str Currency As String = "" Dim acceptable Key As Boolean = False Private _Add Mode As Boolean = False Public Property Add Mode() As Boolean Get Add Mode = _Add Mode End Get Set(By Val value As Boolean) If value _Add Mode Then _Add Mode = value '// handle more code changes here.' 'Me. From Argb(255, 255, 0) str Currency = "" End If End Set End Property Public Shadows Property Font() As Font Get Return Me._Font End Get Set(By Val Value As Font) Me._Font = Value My Base.