Whiteangel Posted March 17, 2014 Report Share Posted March 17, 2014 Boas pessoal, Para eu saber se tenho texto (letras) numa textbox faço assim ElseIf TxtLocalidade.TextLength > 0 Then SairFechar.Show() E como posso fazer para uma maskedtextbox?? Link to comment Share on other sites More sharing options...
Gnrtuga Posted March 18, 2014 Report Share Posted March 18, 2014 Não sei se isto faz o que queres, mas penso que sim: Dim AllText As String For i As Integer = 0 To AllText.Length - 1 Select Case AllText.Substring(i, 1) Case ControlChars.Tab Case ControlChars.Lf Case ControlChars.Cr Case " " Case Else VisibleCharacters += 1 End Select Next Label1.Text = String.Format("Total: {0} characters ({1} characters are visible).", AllText.Length, VisibleCharacters) Mas tenho a impressão que dá para fazer de uma maneira mais simples, mas agora não me lembro qual é.. 🙂 Férias! Estou por aqui: http://maps.google.p...001549&t=h&z=20 (a bulir claro está!) Nunca mais é verão outra vez.. :) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now