Specification Design Windows Application Software Menu

zhaozj2021-02-11  232

When developing software menu interface, you can use the specification set by Windows, not only make the

The menu interface of the application software is more beautiful, and can coordinate with each software in Windows.

Make a large number of users who are familiar with Windows operations, take a look at the usual experience, touch bypass

Know the functions and simple operation methods of the application software, enhance software flexibility and operation

Sex.

The following "Menu Editor" and a "student file in the" Menu Editor "in the VB5.0 tool menu bar (Tools)

Case management software (mainly "file", "system initialization", "grade", "input and check

Inquiry "and other menus, complete report printing, new grade libraries, selection, and database data

Entering and query, etc.) Take some rules for Windows application menu design:

1. Temporarily non-operative menu command items generally shield ash

There are some menu items in the Windows menu that appear in the form of a gray, and use the dotted character to display

Show this category, indicating that it is currently not available, that is, the condition that executes this command is not currently

Preparation. For example, in the student file management software, the initial "Input and Query" menu is as gray because

In the case of "grades", the system will not know which grade student information is to be queried. In Figure 1

When designing, click "Enter" Valid (E) "attributes with the query" menu strip, change its default

"Effective" is "invalid", then design in the "grade" menu, the click events in each grade.

The selected grade information will change the "valid" attribute value of the latter after the "Input and Query" module, let it

Available:

Private sub mnu98dz_click ()

Transfer = "c: /dagl/98dz.mdb"

Mnufind.enabled = TRUE

End Sub

Second, the menu command is playing next to the tag (√)

Some commands in Windows are triggered, and the tick indicates that the command is working, otherwise

It indicates that it does not work, and can be switched back by clicking. For example, in the above-mentioned student file management soft

In the part, when a certain grade is selected, the system hits "√" before the corresponding grade menu, indicating that it is

Operation is this grade database. To do this, just put the corresponding menu of the menu editor

"Check (C)" box is selected, and then add the following statement on the menu to switch the property:

Mnu98dz.checked = not mnu98dz.checked

Third, set the access key for the command option (Access Key)

The menu item with underscore letters, called the command of the command, is for easy access to the keyboard

The user is set, press the Alt key and the letter to open the menu, add the access button as long as the food

In the "Title (P)" box of a single editor, you can add "&" before letting it become the letter to the access key.

Of course, the access button is best not to repeat, otherwise the system only determines the first effective.

Fourth, increase the shortcut key for the command option (Shortcut Key)

There is a key button on the right side of some menu commands, called the shortcut key of the command, can not open the menu

Press shortcuts directly to select this command. Add a shortcut for a command item, you can at the menu

The "Shortcut Key (S)" list box in the editor is assigned a command item, a shortcut in the list

The key can only be assigned once, otherwise the system will refuse accept.

5. Increase the omitted number (...) prompt user after the command option to pop up the dialog box.

In Windows, if you have an omitted number (...) after the command item, you indicate that this command will lead one.

A dialog box, from the dialog system requires the user to provide more information needed to execute the command, when designing, as long as the title of the menu item that will lead to the menu item of the dialog is increasing, "" prompts.

6. Use the arrow (→) pointing to the right to guide the user to select this item will lead the cascade menu.

(Cascading Menu)

Classified menu is the so-called submenu, the arrow in the VB is designed by the system according to the menu editor

The "indentation" degree arranged by the outline is automatically implemented. Therefore, the key is to reasonably in the design menu.

There are up to four submenu in VB in VB in VB.

Seven, the associated command is set by Separate Bar)

In order to quickly find the command item he want to execute in the menu, it is necessary to be related to the menu.

A group of commands are grouped with a partition, such as the file menu, a group of printouts

Command: "Page Settings", "Print Preview", "Print", etc., is separated by separating the sound.

This will insert a special command bar between commands that need to be packet, the "standard"

The title "" - ", and" name "is arbitrary, because the name of this command is generally not referenced in the program.

8. Establish a dynamic menu to improve software flexibility

The dynamic menu is scheduled to run the menu, and there are many software "File" menu in WINDOWS.

Both have the function of remembering several document names that have recently been operated, and the student file management examples of this article

Software, because there will be new students to school every year, when forming new grades, you must be in the "grade"

Dynamically increase the new grade name in order to choose and query, this first to generate a menu life during design.

Let the control array, add a menu option in the editor of the menu,

Set its index property set to 0, then you can join the same name (in this case mnunj),

The index value is incremented by menu options (such as 10), which makes them on the design when designing.

Reference New Year name in the future, and set the "visible" attribute of these alternate menu bars to invalid 4

see. Trouble in the "System Initialization" menu driver event with the establishment and deletion of grades

Use this array name and index value to move new grade name options in "Input and Query", and

Let visible or invisible (when deleting):

Private addmenu_click ()

Counter = Counter 1

NJ = NJ 1 'NJ is a modular level variable, the initial value is 1998

Mnunj (counter) .caption = nj & "grade"

Mnunj (counter) .visible = Ture

End Sub

The "File" menu of many applications in Windows Remember the actual side of the file name that has recently made

Method is similar to this.

Nine, generate pop-up menus, enhanced software operability

Sometimes, in order to facilitate user needs, establish a right-click pop-up shortcut menu for some most common commands,

The previous design of this menu is the same as the Popper menu, and the difference is usually to click "visible

(P) box, let this menu are not visible, then in the MouseDown or MouseUp event in the form

Use the PopupMenu method to implement this menu when you press the right mouse button on the form:

Private Sub MDIFORM1_MOUSEDOWN (Button As INTEGER, SHIFT AS

Integer, x as single, y as single)

If Button = 2 the popupmenu mnuedit

'Mnuedit is made of menu to pop up

End Sub

The PopupMenu method will ignore the "invisible" attribute of the initial setup. The situation is similar to that of other software development tools under Windows.

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

New Post(0)