XTab's Blog

Ged Mead's Blog at vbCity

vbCity Blogs moved to:
http://cs.vbcity.com/blogs
  Home :: Syndication  :: Login

JunJuly 2009Aug
SMTWTFS
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

Archives

Topics

Ramblings

VB.NET

  Here's another in the "Almost too obvious to mention" category, although not new to VB2005.

  One of the new things we learned when the first version of VB.NET came along was that we could use the ToUpper and ToLower methods to convert a string into all upper or all lower case characters.   Don't know about you, but ever since 2002 if I wanted to take user input in a TextBox and then convert it to lower case I've always done something like:

 Dim s as String = TextBox1.Text.ToLower

or even cutting out the middleman and going with just:

 Console.WriteLine(TextBox1.Text.ToLower)

  Both these approaches work just fine, but I was grubbing through the built in properties of the TextBox control today and happened upon the CharacterCasing property which I'd never noticed before.  A click on the little down arrow in the Property Seting cell and, hey presto, you have an instant choice of either Upper or Lower case.  Select your preference and any text entered by users in that particular TextBox will be automatically converted in front of their very eyes into upper or lower casing.

      I wonder how many more of these useful little features are still lying around unnoticed and waiting to be discovered on a slow day?     More than I'll trip over in my lifetime, I'm thinking.

 

 

 

posted on Monday, August 07, 2006 3:00 AM