Interface design principles and programming techniques in Visual basic

Source: Internet
Author: User
Tags error handling implement

In VB, the MDI (Multiple document interface, multi-window program) Form is defined: "The MDI form acts as a background window for a program that contains a form with the MDIChild property to True." In a VB program, there can be at most one MDI parent form and multiple MDI child forms, and the way to create an MDI parent form is to select "New MDI Form" in the VB File menu.

When the MDI program runs, if the child window has a menu, the child window's menu automatically replaces the parent Window menu when the child window is activated, and the child window icon appears in the MDI parent window when the child window is minimized.

The advent of the universal graphical interface of Windows makes it easier for computer users to use a variety of Windows software without specialized learning, and it is a standard that programmers must follow to design the interface of Windows programs. This greatly reduces the burden on program designers, enabling them to focus on the solution and implementation of the problem.

The advent of Visual Basic simplifies the design of the Windows program interface, and requires minimal code to implement the interface of a standard Windows application. However, if you do not understand the principles of Windows Program Interface design, or unfamiliar with VB interface programming skills, it is difficult to design and implement both the general standard and the characteristics of the interface. Interface design principle Interface design has a general principle, the most important is:

1. Interface to have consistency. The principle of consistency is most easily violated in the interface design and is easiest to modify and avoid. For example, you must use the same terminology in the menu and online Help, and the dialog box must have the same style.

2. There are shortcuts to common operations. The use of common operations is large, should reduce the length of the operation sequence. For example, set up shortcut keys for common operations such as opening, saving, and save files. Make the common operation has the shortcut, not only will improve the user's work efficiency, also makes the interface in the function realization concise and efficient.

3. Provide simple error handling. The system should have the function of error handling. In the case of an error, the system should be able to detect errors and provide a simple and understandable error-handling function. The status of the system does not change after the error occurs, or the system provides guidance for error recovery.

4. Provide feedback. Information feedback is essential to the operation of the operators. Feedback on common and simple operations is not required, but the system should provide feedback of information to infrequently used operations and critical operations.

5. Operation Reversible. The operation should be reversible. This is very useful for operators who do not have specialized knowledge. A reversible action can be a single operation, or a relatively independent sequence of operations.

6. Design good online help. While online help is not essential for skilled users, online help is important for most unskilled users.

Principles and programming of menu design

The general principles of menu design are as follows:

1, according to the function of the system to organize the menu.

2, to choose a wide and shallow menu tree, rather than a narrow and deep menu tree.

3, according to the meaning of menu options to group, and according to a certain number of rules sorted. The title of the menu option should be short, clear, and it's best to start with a keyword.

4, the common option to set shortcut keys. In combination with the above principles, menu programming has the following aspects of technology and skills:

Grouping of menu options

In VB, menu options are grouped by a menu bar divider. Add a menu item with a Caption property to "-" at a certain point in the menu, which is displayed as a horizontal line on the menu. In many cases, the same function menu can be divided into groups according to the function of the menu option, at which point you can use a separate horizontal line to achieve the grouping of items.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.