VB program interface design experience

zhaozj2021-02-11  181

VB program interface design experience

Use VisualBasic (hereinafter referred to as VB, version 6.0sp4) to quickly design standard style Windows software, but you have to create a real easy-to-use graphical interface, and there are still many jobs to do. First, the quality of the form design form design often affects the overall image of the software, so you must first deal with the design problem of the form. 1. The default style of the form border form border is "sizeable", but not all forms can use a variable border. Because users often intentionally change the size of the form (such as double-clicking on the title bar), if the form contains a large number of controls, it is possible to cover a partial control or cause the relative position of the control due to the overshoot. Change, the user produces doubts. One way to solve this problem is to dynamically change the location and size of the control during the Form_Resize event, so that it remains relative positions in the form, but the disadvantage is that it is difficult to ensure the visual effect of the control. Of course, you can use the program to control the minimum size of the form, but the simpler method is to set the form border to "fixed single", if you do not want to maximize or minimize the function, you can set it to "Fixed Dialog". 2, the initial position of the initial position of the form directly affects the user's use, especially in a multi-window environment, if the new window completely covers the previous window, the user will be lost for the original window. Use a stacked method to arrange the window and display the process header of each window on the task bar is a good choice. Mode Forms are activated to prevent users from operating other forms, so the mode form must be used without the need to use any other forms, and ensure that the form is movable. 3. Use the multi-document window interface in the multi-window interface, all forms are relying on the desktop, as if there are multiple applications, window management is more troublesome, using the MDI multi-document interface to manage the complexity of window management drop to lowest. In the multi-document interface, there must be only one main document form (MDI main form), its form area cannot place any controls other than the menu class, but can have multiple sub-forms (MDI Subform That is to say, the MDI child form cannot be independently present, and it cannot be a mode form, which can only be active within the form area of ​​the MDI main form; the child form is maximized, the title bar and the menu bar and the main Forms merge; minimizing the child form is not reduced to the task bar, but shrinks to the lower left corner of the main form; when the main form is turned off, all sub-forms can be automatically turned off. Fully using the MDI interface will make the user feel simpler. 4. The arrangement of the control is the most important component of the form that has an important impact on the intuitiveness and ease of use of user operations. The placement of the control should generally follow the principles: according to the position of the function organization control. Place the control in a different area of ​​the form in a different area, which will make the user easier to find the desired function. If the "Font" and "Cancel" buttons are put together, the "color" and "OK" buttons are put together, and the user will not touch the mind. Under the premise of ensuring good visibility, the size of the control should be as "small" as much as possible, so that the size of the form can be minimized. Excessive controls are placed in too small forms. Placing excessive controls in too small forms can cause excessive crowding of form elements to make the title and text of the control. If possible, you should use the icon in the button control, which can make the screen more vivid, making the user more likely to understand the control. Use the "Toolstip" property of the control. "ToolStip" can add a floating prompt for the control. When the user's mouse pointing to the control, the prompt is automatically displayed so that the user immediately understands the functionality of the control in the text, and it will automatically disappear after a few seconds, and will not bring visual obstacles to the user.

Second, the menu design menu is an important component of the interface design, "simple, intuitive, consistent, valid" is the principle of menu design. The following suggestions may be helpful for creating menus that meet the expectations of users. Packet menu items in accordance with logic functions, and arrange the function more relevant project packets in the drop-down menu. Avoid using a menu item that uses multiple identical features in the same menu, otherwise the user will make the user. Avoid using no drop-up menu items because isolated menus items and buttons have no difference. Click on this type of menu item and generate actions directly, usually give the user a feeling of too "sudden". To make user use more convenient, you can set the pop-up menu in the relevant form or control area, and the right-click pop-up menu is recommended. At the same time, these pop-up menus can keep copies in the main menu. If you click a drop-down menu item to pop up the dialog box, it is best to add "..." (omitted) at the end of the menu title, which is the convention of Windows. This will cause the menu closer to the standard Windows menu, bring convenience to users who are familiar with Windows operations. Third, the feeling of taking care of the user is the test gold for the success of the software, which includes many aspects such as the appearance, ease of use, and speed of the software. Usually users always want to see some things when they click icons, controls, or menu items. If there is no change in the screen after clicking, the user may generate confusion, or think that it is not "dead" or simply doubts, but actually programs may be handling things that need to be completed for a longer time. . The result is not to confirm whether the mouse is pressed and run multiple times (this will make the situation even worse), that is, the program is forcibly shut down. This is what we don't want to see. The method of solving is simple, as long as a waiting picture is displayed before starting processing, if a message such as "is processing data, please wait ...", if you can display the animation icon and progress bar, the effect is better. It will become the feeling of it to the user: the program is working hard, and it will be completed soon. If the startup time of the entire program is too long, it will also cause the same situation. You can solve it with a similar method: display a "flash screen", complete the startup process during the display, then close the "Flash" screen, enter the main program (similar to the Word start screen). It should be noted that the "flash" screen is to be displayed, it is best to use SUB_MAIN as the portal of the program. Some procedures with many forms are constantly loaded or unload forms at runtime. The user feels "slow", and the effective method of a row is to pre-load the commonly used form with the LOAD statement in the program startup stage ( Not displayed), as needed, as needed, as long as the SHOW method of the form can be displayed immediately. Although this is possible to increase the time of the program started and the requirements for memory, the performance performance of the program is much faster. In addition, users will compare most of the programs that are not subject to their control, so they will make users have a chance to cancel the operation. Generally, a dialog box can be displayed before performing a key operation, which includes at least two buttons: "OK" and "cancel", which can give the user "anti-repentance" chance; in doing some action required for a long time (For example, data replication), a "cancel" button can be provided without affecting data security, allowing impatient users to terminate the operation. Skilled using the doevents statement when designing this feature. The above is just some of the experiences and feelings in the use of VB programming, hoping to play the role of "throwing brick jade" for the vast VB programmers.

转载请注明原文地址:https://www.9cbs.com/read-4878.html

New Post(0)