September 2006 - Posts

Arrows available in Wingdings 3

Let me show you another good use of applying the trick I've posted earlier, when I wrote the "how-to" for making .NET password field to look more like an XP password field – the trick is done by playing with Fonts.

Now, let's play with fonts even more to have our UI some "arrows" displayed on form without the need to use any arrow-image and/or arrow icons. See the screen-shot below for possible use:



The form above has button displaying up and down arrows, and using the same trick, the arrow buttons doesn't used any images. It is setup using the characters small letter H ('h') and small letter I ('i') with it's font set to Wingdings 3.

Here's the steps in making up arrow button:

1. Add a button
2. Set the button's font to Wingdings 3.
3. Set the Text property to small letter H ('h').

And here's the steps in making the down arrow button:

1. Add a button
2. Set the button's font to Wingdings 3.
3. Set the Text property to small letter I ('i').

In case you might need different arrows, other than up and down arrows, or you want different styles of arrows, here's a small list I've come up which are available arrows inside Wingdings 3:

Play around with the font even more, and you'll see that there are more arrows you can choose from.

Have fun coding your UI!

Cheers,

-chris

Posted by cvega with 2 comment(s)
Filed under:

.NET Password field that looks like Windows XP password field

Here's a trick to make your regular .NET TextBox to have a look similar to Windows XP password field, where it displays large black circles instead of asterisks (****) to "mask" the password (see the Password field shown in the screenshot below):



This trick is fairly easy, and it doesn't require you to perform any complicated owner drawings.

Here's how:

1. Add a TextBox to your Form
2. Set the Font of that TextBox to Wingdings (not Webdings)
3. Set the PasswordChar property to small letter L ('l').

And you're all set, quick and easy.

If you want your password field to have customized look and feel other than the one I described, you may want to experiment using different characters other than small letter L, or use Symbols Font, for more symbols.

Happy coding

-chris

Posted by cvega with 1 comment(s)
Filed under: