The emergence of the general graphical interface of Windows makes computer users do not have to use specialized learning, they can use a variety of Windows software. Not only that, it is still a standard that the program designer must follow when designing the Windows program interface, which greatly reduces the burden of program designers, enabling them to solve the problem and implementation of the main energy.
Visual Basic (hereinafter referred to as VB), more simplifies the design of the Windows program interface, only requires a very small amount of code, you can implement the interface of standard Win-DOWS applications. However, if you don't understand the principles of the Windows program interface design, or don't familiarize with the skill of VB programming, it is difficult to design and implement interfaces that are both a general standard and a featured interface.
Principle of interface design
Interface design has general principles, the most important: 1. Interface has consistency. The principle of consistency is the easiest to violate in interface design, and it is also easier to modify and avoid. For example, you must use the same terms in the menu and online help; the dialog must have the same style. 2. There must be shortcuts in common operations. The usage frequency of common operation should be reduced, and the length of the operation sequence should be reduced. For example, set shortcuts for files for files such as open, store, and save, etc. Make common operations with shortcuts, not only improve the user's work efficiency, but also makes the interface simply and efficiently. 3. Provide simple error handling. The system must have the function of error handling. When an error occurs, the system should detect errors and provide simple and easy to understand error handling functions. The status of the system does not change after the error occurs, or the system needs to provide an error recovery. 4. Provide information feedback. An important operation of the operator must have information feedback. Feedback to usual operations and simple operations can not be required, but the system should provide feedback on the information of uncommon operation and critical operations. 5. Operation can be reversible. The operation should be reversible. This is quite useful for operators who do not have expertise. The reversible action can be a single operation, or a relatively independent operation sequence. 6. Design well online help. Although online help is not a less than skilled users, it is very important for most unuspriced users.
Menu design principles and programming
The menu design has the following general principles: Organize the menu according to the functionality of the system. To choose a wide-shallow menu tree, not a narrow and deep menu tree. Packet according to the meaning of the menu option; and sort by a certain rule. The title of the menu option should strive to make a shortness of literature, clear meaning, and it is best to start with keywords. Common options To set shortcuts. Combined with the above principles, menu programming has the following techniques and techniques: the grouping of menu options In VB, the packet of the menu option is separated through the menu bar. Add a Menu item that is "-" in a certain location of the menu, which behaves on the menu as a horizontal line. In many cases, the same function menu can be divided into several groups in the functionality of the menu option, and the split horizontal line can be used to implement the packet of the menu item. Open the Menu Design Window for the Menu Design Window, you should select one in this table for each menu option. It should be noted that the shortcut key of the menu or the top menu with the submenu cannot be defined. According to the interface design principle of Windows, the shortcuts of the top menu are the Alt letter key. For some common function menu items, there is a customary shortcut. For example, the file is opened with CTRL O, the file storage is used to print Ctrl P, and so on. After defining the shortcut for the menu option, the text representation of the shortcut key will appear later on the menu. Menu options and disabilities, visible and hidden in order to indicate some of the special features of the menu option, you might use to use the menu options and disable, visible and hidden properties. This option should be prohibited when the function represented by an option cannot be implemented because some reason is not implemented. The enable and disable of the menu option is achieved by changing the enabled attribute of this option. For example, it is assumed that the menu option is mnuname, and the option can be disabled: mnuname.Enabled = false, hiding an option, you can use: mnuname.visible = false, make a hidden option to recover, you can use Mnuname. Visible = True menu item hidden and recovery can be used in the implementation of the dynamic menu. The dynamic load menu item of the menu item is not fixed by the number of menu items and can be dynamically loaded when needed. The simplest example is a list of recently opened files in the file menu. Before the file is opened, the list is empty and does not appear in the file menu; after opening a file, the list is no longer empty, and the menu item that represents the opened file appears in the file menu. In the above example, the subscript property (INDEX), the visual property (Visible), the Title Properties (CAPTION), the Title Properties (CAPTION), the Title Properties (CAPTION), the Title Properties (CAPTION), the Load Method are used. The specific implementation process is as follows: Add a menu item in the File menu, the title is arbitrary, and assumes that the Name property of the menu item is OPENED_FILES_LIST; change the visible properties of the menu item Opened_Files_List, make OPENED_FILES_LIST.Visible = false Change the menu item OPENED_FILES_LIST subscript Attribute, make OPENED_FILES_LIST.INDEX = 0 to control the dynamic load of the menu item open_files_list in the program. Suppose the file name of the opened second file is displayed, and the file name is stored in an array OPENED _FILE_NAME. It should be noted that the Load method cannot be used for a menu item with a subscript 0. Because the menu item has been loaded into the memory when executed; in addition, the "&" character in the menu item has a special meaning, its role is to display the property string At the same time, "&" itself does not display "&" itself, and the characters that keep up "&" have underscores, and the characters become hotkeys. If the menu item that is not 0 is no longer required, in order to reduce the occupation of memory resources, you can use the un-load method to remove it from memory; in the same, you cannot use unload to remove the menu item with 0. The menu for the pop-up menu is designed in the Menu Design window is a drop-down menu. The drop-down menu is the menu that the user can select after the top menu bar at any time, and the pop-up menu is the menu that appears after the mouse button in a certain area of the program interface. In some cases, the pop-up menu makes the implementation of the system function more simple and efficient, and it is more useful to use it.