ErrorProvider

Few days ago I worked on some winforms and needed some validator controls. I thought that the winforms should have the same validator controls as webforms. However I could not find them. So I used the ErrorProvider control which also does a good job. However it does not come with any regular expressions or something like that to validate any email or web url. You will have to find the regular expression on your own. A good website to to do that is RegExLib. This Website already contains many pre-defined regular expressions. It also contains basics to learn regular expressions. Let's get back to the ErrorProvider. To implement the ErrorProvider in your project, just drop it in your form or double click it and you will see it below the form in a bar. Now each control on your form will get an extra property called: Error on ErrorProvider1. You can set the default error message here if you want. If not you can leave it blank and in your code you can access the property via the method SetError. Just define the message in the SetError method and it works. If an error occurs you won't get any MessageBox or the errormessage isn't displayed under the control. Instead you will see a small icon right from the control which will blink for a few times. If you then hover over the control, you will see the errormessage as a tooltip. Something like this:



You can even use your own icons for that.

Update: I just had a short IM conversation with Christian Weyer and he told me that there aren't any validator controls for win forms. One way would be to use the Validating event, but that's old school style and he hopes and actually thinks they will be there in 2.0. Microsoft don't disappoint me and Chris :-)

Sonu

Comments

# David Silverlight said:

Yes, I agree that it is better to display the error message on the form so that the user can see it directly. Although it is nice the way that it displays it as a tooltip when you hover over the exclamation point, that should be in addition to displaying in behavior. Unfortunately, I do not work very much with winforms, so the only suggestion that I would have would be on the manual variety. It would be nice to find out if there is a built in mechanism similar to the validation control implementation. I will check this post later in case any good suggestions are posted.

Wednesday, July 14, 2004 8:54 AM
# Phil Weber said:

Sonu: You may find this article (and the others in the series) interesting:
http://msdn.microsoft.com/library/en-us/dnforms/html/winforms05182004.asp

Wednesday, July 14, 2004 10:31 AM
# Sonu Kapoor said:

Thanks for the URL's Phil! The articles are indeed interesting.

Wednesday, July 14, 2004 10:54 AM
# Nish said:

Interesting write-up, Sonu.

Wednesday, July 14, 2004 10:52 PM
# Sonu Kapoor said:

Thanks Nish!

Thursday, July 15, 2004 7:10 AM
# icons set said:

P.S. Please review <a href="designesticons.deviantart.com/.../Hardware-Icon-Set-Classic-286946007">Hardware Icon Set Classic ... from designesticons</a>

Friday, September 21, 2012 2:31 PM
# icons download said:

 You are absolutely  right. In it something is also to me this idea is pleasant, I completely with you agree.

<a href="www.hpixel.com/.../a>

Saturday, September 22, 2012 2:16 AM
# icons said:

P.S. Please review our <a href="http://getpixel.us">design portfolio</a> for Doors2012.

Thursday, December 13, 2012 12:26 AM
# get icons said:

P.S. Please review our <a href="http://getpixel.us">design portfolio</a> for Doors2012.

Thursday, December 13, 2012 3:20 AM
# windows icons said:

P.S. Please review our <a href="http://adultfacebookinfo.info">design portfolio</a> for Doors2012.

In Names, Tag Lines, and Company Personas - Why Bold Branding Wins

Yesterday I read an article about initiatives on the part of some airlines to facilitate passengers sitting next to someone they'd find interesting, while other airlines are making it easier to increase the odds of having a quiet flight by having no one sit in the next seat.Most people probably have a preference on this. Either they would like to talk to someone interesting on a long flight or would prefer to zone out in solitude. The feelings of those who don't care one way or the other undoubtedly have a lower intensity than the feelings of those who like or hate one ofc these options.Indifference isn't motivating. Attraction and repulsion are.And that's why blandness and similarity to competitors have such little power when it comes to publicity, word of mouth and customer loyalty. By not standing out, by trying to appeal to everyone and their uncle, companies have little or no energy charge. They earn little notice and fade into the background.Bolder branding works, however, because it doesn't try to please everyone. It aims to please those it has defined as ideal customers. When it's intelligently implemented, those who like the bolder branding really, really like it. Those who dislike it don't count. Thesy aren't a loss because the likers are more likely to stick around, tell their like-minded friends and colleagues about the company and promote the company and what it sells through articles, tweets, blog posts and media coverage.You can certainly take bold branding too far - for example, by making it offensive in ways that cast shame on the company and its fans. Short of that, however, bold branding aligned with the desired customer base is very smart.Branding elements include the company name, its tag line and the personality a company takes on, as well as dozens of other items.Get started on bold branding by becoming clear about who the name or other branding element needs to appeal to, along with whose opinions don't matter at all. Warm up creatively by identifying other companies and advertising campaigns that you see being aimed at the same target population. Also identify their polar opposites - companies and campaigns that would make yuor target market shudder or tfurn away.Then throughout your brainstorming for new ideas, post those desirable and undesirable images on the wall to remind you that you're not trying to please the world at large or yourselves in coming up with ideas. You're trying to reach a certain set of people who have particular knowledge, attitudes, values and preferences. Above all, do not take a vote among the general public on branding elements or let the opinions of random people count in any way. Instead, create a set of criteria you can use to distinguish ideas that match the right profile from those that do not.If you can keep your eye on the goal, you'll reject boring, me-too branding elements and select bold names, tag lines, personas and more with exactly the right kind of magnetic charge.

Friday, December 14, 2012 4:09 AM

Leave a Comment

(required) 
(required) 
(optional)
(required)