So, as we've said, usability is all about helping the user to
get it right, helping them to use our application successfully.
And I'm going to list very quickly, several
ways in windows forms that we can achieve that.
And then we're going to go back to our demo
application and put a number of these into practice.
So there are lots of ways that you can explain to the
user what's going on and how to use your application.
And tool tips are one way that we've already
mentioned, and you can add these very easily with
the tool tip component that comes with windows forms.
Also windows forms allows you to plumb in to the help system.
If the user presses F1 an event's going to be raised that we
can handle, and you can also add a help button to your form.
Another useful technique.
Is to have first run tutorials or hints.
So the first time the user runs your application text appears or
message boxes pop up that give them some hints as to how to use your
application success, Philly, and what they need to do next summer.
Patients in your application may have enough complexity to
require wizards that guide the user through entering information.
Step by step.
And if the user doesn't do something wrong, maybe on a form
of data entry with lots of inputs, it's useful to indicate
which field they got wrong and what the problem was.
And the windows forms, error provider control allows you to do that.
Associating an error with a particular control.
In fact, in many line of business applications, there'll be
views or forms where the user has to enter a large amount
of data, maybe information about a customer or an order.
And so again, it's going to be very useful if
we can help them in those controls, where they
enter the data, not to enter the room wrong thing.
So if you've got a text box for text input, Then make use of
properties like max length so that they content and more data
than the underlying database field will allow or make use
of the auto-complete feature of textbooks with which you can
prompt the user to reuse things that they've entered before.
If you need to take numeric inputs, you could use
the textbooks for that, but then you have to deal
with what happens when the user enters something.
That's not a number windows forms does actually come with a number
of controls, like the numeric up-down, which you can see in our demo
application for the rating, or even the track bar, which is a slider.
The advantage of using these is it's not possible to enter
something that's out of range or that isn't a number.
In fact, this principle is even more important.
If you need to take data inputs, don't just give a user a textbooks
because there are so many different ways people can format dates.
And there's a good chance.
You won't be able to interpret what the user's written.
Instead, again, windows forms comes with a couple of choices for
entering dates, such as the date, time picker or the month calendar.
And in fact, many third party control libraries for windows
forms provide you with some really nice alternatives.
If you don't like the ones that come out of the box.
But that's enough talking.
Now we could go on giving many examples of ways in which
you can help the user to enter the right data and to
understand what they're supposed to do in your application.
But let's take a few of these suggestions that I've
just given and apply them to our demo application.