Best Practices


Userform Checklist

1) Don't show windows forms in the task bar "ShowInTaskBar = False"
2) Are similar controls of the same size
3) Make sure dialogs so not go behind active file/document
4) Are the controls evenly spaces
5) Is the dialog box too overwhelming if you split the controls over several tabs
6) Can every control be accessed with a hot key
7) Are any of the hot keys duplicated
8) Is the tab order set correctly
9) Will the form take the necessary action if it is dismissed or the user presses the Escape key
10) Are there any spelling mistakes in the text
11) Does the form have an apropriate caption
12) Are the controls grouped together logically
13) Do all the controls only allow valid values to be entered or selected
14) When you have 2 listboxes allowing the user to move items between them, allow "double click".
15) Don't enable "Save" or "Save & Close" buttons until the form has finished.


If you make any changes to any of the tabs and press Cancel or the X, prompt to save the changes ?


Prefix all controls with "Form" so that all the event handles are grouped together



bool Private_Validation_BeforeLoading 
void Private_Form_Load
void Private_Form_Close
void Private_Form_Closing
bool Private_Validation_BeforeSaving
bool Private_Form_Save
string Private_GetValuesCurrent
string Private_GetValuesLatest

Shortcut Keys

Tab - Move to the next option or option group
Shif + Tab - Move to the previous option or option group
Ctrl + Tab - Switch to the next tab in the dialog box
Ctrl + Shift + Tab - Switch to the previous tab in the dialog box
Arrow Keys - Move between options in an open drop-down list or between options in a group of options.
First Lette of an option in a drop-down list - Open the list if it is closed and move to that option in the list
Alt + Letter of an underlines option - select the drop-down list
Esc - Close the selected drop-down list, cancel a command, close a dialog box
Enter - Perfom the action assigned to a default button in a dalog box.



© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext