XTab's Blog

Ged Mead's Blog at vbCity

This blog hosted by:
http://blogs.vbcity.com      
  Home :: Syndication  :: Login

AprMay 2008Jun
SMTWTFS
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

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