Rules to Better Interfaces (Windows Applications)
RuleSummaryIntro
Since 1990, SSW has supported the developer community by publishing all our best practices and rules for everyone to see.
If you still need help, visit Website Design and User Experience and book in a consultant.
Hold on a second! How would you like to view this content?
Just the title!
A brief blurb!
Gimme everything!
Page Content
Too many developers never change the Title Bar. The Title Bar should reflect the current document in the same way that Microsoft Word, Notepad, etc do.
Imagine if every email that Microsoft Outlook opened didn't change the title bar. When you were to open a few emails and then take a look in the Taskbar, they would all look the same.
Therefore change the Title Bar to have the current document/customer/job/project/product name that the user is working on. It should be in the format "Document - Program Name", i.e. 'Northwind - SSW Data Renovator'

- Figure: Good Example - Application with a standard title bar caption
When advertising and promoting your application using screenshots, you will want to have the URL for your company website displayed. This makes for good, free publicity.
If you want the URL to be shown as often as possible, you can place it in the title-bar of your form. That way, your URL will be visible in all screenshots that show the title-bar.
-
- Figure: Good Example - The company URL appearing in SSW SQL Auditor
Note: Make sure the URL won't take other important information's place.
Note 2: Through certain coding tricks, it is possible to have the URL on the title-bar right aligned. This isn't a good idea, however, as it can produce undesirable results under certain conditions. For example, when the user hovers the mouse pointer over the form's button on the taskbar, the resulting tool tip looks somewhat distorted.
-
- Figure: Bad Example - Bad caption in SSW SQL Deploy
Plain menu items make your application look normal and less expressive.

- Figure: Bad Example - Plain menu
While icons can make your application look good.

- Figure: Good Example - Menu with icons
More information
You can use the MenuStrip control in .Net

- Figure: the Menuitem has a simple image property
Sounds are important to an interface. Sounds provide an extra level of feedback to the user. For example, in Outlook, you can enable sounds, which notify the user when text is copied or pasted, or mail items are received, moved or deleted. Important situations where sounds should be used include:

- Figure: Good Example - Windows message boxes plays a sound... which cannot be captured in screenshot form.
A message box automatically provides this functionality so there is no need to manually put a beep right before a message box pops up.
Dim Message As String = "You did not enter a server name. Cancel this operation?"
Dim Caption As String = "No Server Name Specified"
Dim Buttons As Integer = MessageBoxButtons.YesNo
Beep()
result = MessageBox.Show( Me, Message, Caption, Buttons)
- Figure: Bad example - The sound on the button is hardcoded in this code snippet
Dim Message As String = "You did not enter a server name. Cancel this operation?"
Dim Caption As String = "No Server Name Specified"
Dim Buttons As Integer = MessageBoxButtons.YesNo
result = MessageBox.Show( Me, Message, Caption, Buttons)
- Figure: The code is not present in this example as it is automatically done
Some processes might take a long time to be completed and this can frustrate the user. The best way to avoid this frustration is giving information and options.

- Figure: Bad example – this progress bar looks like it is stuck at 99%. Ideally the progress bar should be hidden when completed and replaced by a green tick
The importance of having the status of progress bar on winform's title:
- Users can clearly see the progress status.
- If the winform is minimized to taskbar, users still can see the progress status.
The form title should take the form of "[XX]% Completed - [Task Description] - [Product Name]".
There is another relevant rule about the
winform title.

- Figure: Bad Example - The winform's title does not contain the progress status

- Figure: Good Example - The winform's title contains the status of progress bar

- Figure: Good Example - You can clearly see the progress status from taskbar when you have the windows minimized

- Figure: Good Example - Windows 7 shows the progress in the taskbar (which is visible even when the application is minimized)
Give users the chance to skip a lengthy process.
When your wizard has a lot of processing, do you allow the user to skip that processing when appropriate? It may be that the user simply wants to see the results of the last time the wizard was used, or is interested in seeing what comes after the processing step before deciding to run the process.

- Figure: Good Example - Here the user can skip a long process and see the last results (from SSW Diagnostics)
When stopping processes, you should use 'Cancel'... Not 'Stop'. The meaning of 'Cancel' is clearer to users, as opposed to 'Stop' which might also mean 'Pause'.

- Figure: Bad Example - Stop is an ambiguous term and can be momentarily confusing

- Figure: Good Example - Cancel leaves little room for miscommunication
The last thing a user wants is to be stuck waiting around for a long-running process to finish that they accidentally started in the first place. This heightens frustration with the application because:
- They do not know how long the process will last (adds uncertainty to the user experience)
- They cannot stop the process (creates lack of control in the user experience)
Instead, keep users happy with your application by:
- Showing status description information above the progress bar
- Allowing the user to stop the process at any time by clicking "Cancel" (or as a minimum, prompt for confirmation before the long running process starts)

- Figure: Good Example - Progress Bar with description and Cancel Button

- Figure: Good Example - Progress Bar with description and status, and Cancel Button
If you are unable to show a progress bar, you should still indicate that it may take be a long process. For example, if installation takes more than 5 minutes, let your users know so they can get on with something else:

- Figure: Bad example - An unknown length of time. So let them know

- Figure: Good example – The coffee cup tells the user that they will be here a while
Whenever a long process is churning away (e.g. about 10 seconds) users will usually do something else, either make a coffee or switch to another window.
Your application should remind the user to go back and check on it by:
- Playing a sound
- Hiding the progress bar
- Showing a message box at the end of the long process
When using Message Box to indicate user a process is done, always includes detailed summary of the process. Don't just say "Process completed."
Process completed.
- Figure: Bad example – No detailed information
This is just like standing at a set of traffic lights listening for the beep to know when to walk, rather than constantly looking at the red and green lights.

- Figure: OK Example - A completed progress form
Manual extraction process completed.
Mailboxes scanned: 8
Mailboxes skipped: 2
Total mailboxes: 10
Time Taken: 10 minutes, 15 seconds
- Figure: Good example – The user can see what has been processed
If you are shipping a product that makes use of a database backend, then you should also supply and option to automatically populate the database with some sample database. This is particularly important if you are offering your software as a trial license and need to have data in the database to show off your application's ground breaking functionality.
Tip: you can script your data in a sample database to a .sql file with a lot of INSERT statements and then use a product such as SSW SQL Deploy to manage the safe execution of your .sql file.
You should prefix your sample databases with your company and products. This is so your users can tell easily at a glance what it is for. Sample databases should be named in the following way:
- SSWSQLAuditorNorthwindSample
- SSWSQLTotalCompareNorthwindSamplePub
- SSWSQLTotalCompareNorthwindSampleSub
Sample Access database are named similarly:
- SSWLookOutNorthwindSample2000.mdb
If you have an SQL script that runs as part of your install you should always make sure that it does not drop the database first. When you typically auto-generate a script file from some of the SQL applications (such as Enterprise Manager) it will automatically attempt to drop a database if it already exists. This is bad practice as a company may already have a large investment in the data already in the database and dropping it may cause them to lose this investment.
If you know which machine the database is going to be installed from within your application you should first check that it doesn't already exist and prompt the user accordingly to let them know that they should first manually delete the database. For example the install of the SQL Reporting Services setup handles this problem in an appropriate and simple manner (although some additional help could be provided).

- Good example – an application should never automatically delete a database, not even a sample database
If you cannot be sure of the machine that the database is going to be installed on then you should make use of third party .sql script execution managers such as
SSW SQL Deploy to ensure that when you attempt creation of databases where the database already exists then things will run smoothly.
A product should not close without providing a warning. We use the following message box to warn the user before closing a program:

- Figure: Good Example - Standard warning before a program exits
private void OnExit(object sender)
{
EventHandler handler = ExitRequest;
if (handler!= null )
{
handler(sender, EventArgs.Empty);
return;
}
string closeTitle = string.Format("Exiting{0}", Application.ProductName);
string closeMessage = string.Format("Are you sure you want to exit {0}", Application.ProductName);
DialogResult result = MessageBox.Show(closeMessage,closeTitle, MessageBoxButtons.YesNo,MessageBoxIcon.Warning);
if (result == DialogResult.Yes)
{
Application.Exit();
}
}
Training Videos provide a straightforward way to help the user look into your product and help them have a good understanding. It's better to have a "Training Videos" item in the help menu.

- Figure: It's better to provide such a "Training Videos..." menu item
Every application you build should have the same "Help | About" form. The form should always display the following information:
- Version number
- URL
- Description of the product and what it does.
Tip: This should be consistent with your standard description on the product box, website homepage, product page etc.
- Contact details (especially a phone number)
- Branding (logo)
Users who are finding your application a little hard to use will always look for a user guide. The first thing they would do is to reach for the help menu. The "About" button can provide a link to the product website, but this is not very handy and obvious for a user who needs quick help. A link to the user guide must be in the "Help" menu.
There are benefits of having your user guide online:
- Easier to keep up-to-date and maintain
- Stats on usage
- Allows community commenting

- Figure: Good Example - "User Guide" link in the "Help" menu

- Figure: Good Example - Telerik keeps their "User Guide" online
A common oversight is applications don't check for invalid data. You should add "Tools | Validate Data" to your application.
So when you add business rules to the middle tier, consider scenarios such as importing data and any other areas that side step business rules. Therefore we always make validate queries that if they return records, they must be fixed. Examples are:
- For SQL Server we use vwValidateClient_MustHaveACategoryID, or procValidateClient_MustHaveACategoryID
- For Access we use qryValidateClient_MustHaveACategoryID

- Figure: Good Example - This application, while not the prettiest, has a handy validation tool to check for incorrect data
Related Links
A good help menu should have these 8 items in it:
- Training Videos
- Online User Guide
- Knowledge Base
- Make a Suggestion
- Report a Bug
- Check for Updates - [Product Name]
- Check for Updates - All Programs
- Run Unit Tests...
- About [Product Name]...

- Figure: Bad Example - Example of a Help menu with only "About"

- Figure: Good Example - Example of a Help menu with all 8 items