Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Need Help can someone told me why i am no success show my error message when my textbox word out of limit

$
0
0

Good Day, i am wring one program. The program purpose is when the textbox detect textbox word is out of limit it can't to continue writing and it will pop out a error message. Below is my code can someone help me take a look.

Dim i As Integer
txtCN.MaxLength = 15
i = txtCN.MaxLength

If txtCN.Text.Length > i Then
MessageBox.Show("Maximum is 15 Character", "Error Message")
End If

  Dim i As Integer
        txtCN.MaxLength = 15
        i = txtCN.MaxLength

        If txtCN.Text.Length > i Then
            MsgBox("Maximum is 15 Character")
        End If

Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>