w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
vb.net how to check case of label.text i.e lower case, upper case

isUpper and isLower apply to single characters within a string. I think a better solution is to create a temporary string that is formatted the way you want it and return the comparison.

As an example (for ProperCase)

If String.Format(yourString, vbStrConv.ProperCase) = yourString
    'your code for proper case
End If

With this, you should be able to get most of your comparisons going. As for toggle case, you are going to have to write an algorithm that does the string conversion for you. See http://www.codeproject.com/Tips/162540/Letter-Case-Conversion-Algorithms-Title-Case-Toggl for a fairly useful algorithm.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.