收藏 分享(赏)

vb view(VB查看).doc

上传人:dzzj200808 文档编号:2791852 上传时间:2018-09-27 格式:DOC 页数:21 大小:31.70KB
下载 相关 举报
vb view(VB查看).doc_第1页
第1页 / 共21页
vb view(VB查看).doc_第2页
第2页 / 共21页
vb view(VB查看).doc_第3页
第3页 / 共21页
vb view(VB查看).doc_第4页
第4页 / 共21页
vb view(VB查看).doc_第5页
第5页 / 共21页
点击查看更多>>
资源描述

1、vb view(VB 查看)Visual Basic interface design Grand View Author: unknown update time: 2005-05-02One prefaceUser interface is the most important part of an application. For the user, the interface is the application, and they dont feel the code behind the scenes being executed. Regardless of how much t

2、ime and effort it takes to compile and optimize the code, the usability of the application still depends heavily on the quality of the interface. The first step is to design a very perfect interface, which is very difficult, and it needs to be repeated many times under the users participation. In or

3、der to design a user interface, the first thing is to know what a good interface is, and make a preliminary planning for the application that you want to develop.Two interface design preliminary planningBefore you design a user interface, youd better refer to some of the applications of Microsoft or

4、 other companies. In this process, well find many generic things, such as toolbars, state bars, tooltips, context menus, and markup dialogs. At the same time, with the experience of using your own software, think about some of the interface applications that have been used, which can be absorbed and

5、 utilized. But remember, personal preferences are not equal to the users preferences, the users opinions and needs must be absorbed recently. As everyone knows, the earlier the user participates in the design process, the less time and effort the designer spends, the better the interface and the mor

6、e practical it will be.When designing an application program interface, the whole system interface should be initially planned. Should we use a single document or multi document style? How many different forms do you need? What commands will be included in the menu? Do you want to use the toolbar to

7、 repeat menus? What dialog boxes are available to interact with users? What kind of help do you need?Interface design also needs to consider what the purpose of the application is and who the user is expected to be. Often used applications and occasionally used helper programs should be treated diff

8、erently. Applications that display information and applications that collect information should also be different. The goal is for beginners applications, the interface design requirements are simple and clear, but for experienced users can be more complex. If the system is planned to be published g

9、lobally, language and culture must be taken into consideration by the designer.Design of three interface controlAfter determining the interface style of the whole system, the specific design of the individual interface should be carried out. In this process, we should consider which controls need to

10、 be used to complete the system functions, the relationships between these controls, and their relevance and importance.1 conforms to the Windows interface criterionThe main advantage of the Windows operating system is that it provides a common interface for all applications. If users know how to us

11、e Windows based applications, its easy to learn to use other applications. It is not easy to accept an application that is too far from the established interface guidelines. For example, the menu design, most of the Windows based applications follow the standard: “file“ menu on the left, then “Edit“

12、, “tools“ and other optional menu, the right side is “help“ menu. If the “help“ menu is placed at the top, the usability of the application will be reduced. The location of sub menu is also very important. The user expects to find the “copy“, “cut“ and “paste“ sub menus under the “Edit“ menu, and if

13、 they move to the “file“ menu, it will cause the users understanding. Dont stray too far from the established rules, unless theres good reason to do that.2 determine the location of the controlIn most interface design, not all of the interface elements are equally important. Careful consideration is

14、 necessary to ensure that the more important elements are, the more quickly they appear to the user. Important or frequent access elements should be placed in a prominent position, and less important elements should be relegated to a less significant position. Normally,The users eyes will first look

15、 at the left upper part of the screen, so the most important element should be placed on the left upper part of the screen. For example, if the information on the form is related to the client, its name field should be displayed where it can be seen first. The buttons, such as “OK“ or “next“, should

16、 be placed in the lower right part of the screen. Users do not normally access these buttons before they have completed the operation of the form.It is also important to divide the controls into groups, and try to group them according to function or logic. For example, the buttons for database opera

17、tions should be visually divided into groups rather than scattered around the form, because their functions are related to each other. In many cases, you can use framework controls to help strengthen the connection between controls.3 ensure consistency of interface elementsIn user interface design,

18、consistent appearance can create a harmonious beauty in the application program. If the interface lacks consistency, the application looks very messy and disorganized, reducing the interest of people using the application.In order to maintain visual consistency, the overall design strategy should be

19、 created prior to the development of the application. Design elements such as the type of control, the size of the control, the grouping criteria, and the selection of fonts should be determined beforehand, and a design template can be created to help design. Sometimes there are many controls to cho

20、ose from, and you should select the subset of controls that best fit the particular application. Although listbox, combo box, grid and tree control can be used to represent information lists, it is best to use the same control on the interface as much as possible.The design process should conform to

21、 the usual conventions and use the controls appropriately. Although the TextBox control can also set its read-only property to display text, the Label control is more suitable for this purpose. When you set the property for the control, keep it consistent. If you use white background for editable te

22、xt in one place, dont use gray any other reason unless you have a good reason. Form consistency also plays a very important role in the usability of applications. If you use a gray background and a 3d/33.shtmltarget=_blank class=article 3D effect on a form, and use a white background on another form

23、, the two forms are irrelevant. The wise choice is to determine a type and keep it consistent throughout the application.4 beautify the interface and controlsTry to use a three-dimensional effect of controls, so that the user interface has dynamic. For example, the 3D effect on the command button ma

24、kes them look like theyre being pushed down. If you design the command button of the flat border, you will lose this motion, so you cant clearly tell the user that it is a command button. The text box also provides a movement that allows users to expect boxes with borders and white backgrounds, and

25、the boxes contain editable text. Displaying a text box without borders (BorderStyle = 0) is also possible, which makes it look more like a tag, and does not explicitly prompt the user that it is editable.Using the blank space in the user interface helps to highlight elements and improve program avai

26、lability. The blank space is a blank area between the form controls and the controls. There are too many controls on a form that cause the interface to be disorganized, making it difficult to find a field or a control. In the design, you need to insert blank space to highlight the design elements. T

27、he consistent spacing between the controls and the alignment of vertical and horizontal elements will make the user feel better.The use of color on the interface will increase the users visual appeal, color can cause peoples strong emotions. Everyones love of color is very different, the taste of th

28、e user will also be different. Generally speaking, it is better to preserve the tradition and use some soft, neutral colors.Sometimes a small amount of bright color can be used to highlight or attract peoples attention to important areas. The intended audience and try to convey emotion and tone will

29、 also affect the selection of color, such as red, green and yellow is bright in children use the application, but in banking applications may not be suitable for.The use of pictures and icons can also increase the visual interest of the application interface. Toolbars with icons of various functions

30、 are a useful interface device, but they can backfire if you cant clearly identify what the icons do. When designing toolbar icons, you should first understand the conventions of custom. For example, many applications use a curling angle on the paper that a new file icon, if the switch to said other

31、 method will cause the user confusion. It is also important to take into account the cultural meaning of images. Different people may have different understandings of the same image. At the same time, in the design of their own icons and images, should be as simple as possible.Fonts are also an impo

32、rtant part of the user interface, because they often deliver important information to the user. Unless you plan to configure fonts by application, you should stick to standard Windows fonts, such as Arial, New, Times, System, Roman, etc Usually hand written fonts or other decorative fonts print bett

33、er than screen effects. Be careful not to use too many fonts in the application, and dont set too small fonts, so as not to affect the users reading.Interface design should also consider the principle of simplicity, from the aesthetic point of view, clean, simple and clear design is more desirable.

34、An easy mistake in the process of interface design is to try to imitate the object of the real world with the interface, which is not necessary and has no real meaning to the user. The best design interface, not only to complete the function, but also to make the user feel clean and comfortable.Four

35、 conclusionIn short, the interface design should be user centric, should meet the needs of users. On this basis, we should consider the composition or layout of the interface, the position of the interface elements, the consistency of the interface elements and other issues to beautify the interface

36、, and improve the usability and aesthetic feeling of the application interface.Sometimes, when there are more controls in a window, its the best way to guide the user to what he should do next.In the program design of Basic Visual, we can use the statement: Object.SetFaocus makes us want the control

37、 has the input focus, for example: in Form1, we add a Command1 button and a text input Text1, double-click the control button, and then type the following code:Text1.SetFocusBy pressing the F5 running program, youll see a click button, and the textbox will immediately get the input focus. In additio

38、n, we can use the statement: Sendkeys “TAB“ to make the next control focus, but we need to determine the Index value of each control at design time. (in the Properties window) allows the controller to feel that his work has been done, and the initiative to focus out, will make the user think that th

39、e application is very smart, but also reduce the chance of user error.However, when the focus switch of the two controls is separated by a certain distance, the above method is sometimes not enough to arouse the attention of the user, then a good solution is to move the mouse arrow to the control. U

40、nfortunately, VB does not support the mouse movement, then we call for the API function, API function SetCursorPos allows us to do so.Here is the subroutine MoveCursorOn, which allows the mouse to move to the top of the specified control.The following code is placed in the declarations section:Type

41、PoinTAPIx As Integery As IntegerEnd TypeDeclare Sub SetCursorPos Lib “User“ (Byval x As Integer, Byval y As Integer) Declare Sub ClientToScreen Lib “User“ (Byval hWnd As Integer),ippoint进行)声明函数 getParent lib“用户” (ByVal hwnd 为整数)整数然后建立一个新的子程序(ALTNN键入子程序名movecursoron) ,下面是子程序的代码:Sub MoveCursorOn(源控制)昏

42、暗的 Pt为 pointapidim hparent作为 integerp。x =(源。左源。宽/ 2)/屏幕。twipsperpixel)p.y =(源。顶源。高度/ 2)/屏幕。twipsperpixel)hparent = getParent(源。hWnd)使用的 hparent ptsetcursorpos PT X。pt.yend 子使用该子程序很容易,例如我们想把鼠标移动到按钮 COMMAND1上,就可使用语句移动光标在 COMMAND1您会看到鼠标箭头已经指着按钮 COMMAND1。需要说明的是,千万不要滥用该子程序。让鼠标自己满屏乱飞,我们的用户会感到失去对应用程序的控制,这是

43、违反我们的初衷的。在有数个输入框的窗口中(这在数据库应用程序中是很典型的) ,当用户完成第一个输入框的输入后,总爱?性的加一个回车,希望输入焦点落到下一个输入框中(DOS 中大多数应用程序是如此) ,可往往事与愿违,这一回车却触发了拥有默认特性的按钮,结果不是关闭了当前窗口就是又蹦出另一窗口。用户睁大眼睛看着屏幕, “咦?!我到底做了什么这是 Windows新用户经常遇到的事情?” 。解决它其实很容易,只需在输入框的按键事件中加入如下代码:如果 thenkeyascii KeyAscii = 13 = 0sendkeys“Tab”结束这样,当用户在这个输入框中键入进入时,就象键入选项卡键时,焦

44、点被移到下一控件上。但需注意,这种方法不适用启用多行功能的 TextBox,即 TextBox的行特性设为真时,因为这时的回车键是起换行的作用。MDI(multipledocumentinterface,多窗口程序)窗体是这样定义的:“MDI 窗体作为一个程序的后台窗口,包含着 MDIChild属性为真的窗体” 。在一个 VB程序中,至多只能存在一个 MDI父窗体,可以有多个 MDI子窗体;建立一个 MDI父窗体的方法是在 VB的文件菜单里选择”newmdiform” 。在 MDI程序运行时,如果子窗口具有菜单,那么当子窗口被激活时,子窗口的菜单就会自动替换父窗口菜单;当子窗口被最小化时,在M

45、DI父窗口里就会出现子窗口的图标。Windows的通用图形界面的出现,使计算机用户不必通过专门的学习就可以得心应手地使用各种 Windows的软件;不仅如此,它还是程序设计者在设计 Windows程序的界面时所必须遵循的标准,这在很大程度上减轻了程序设计者的负担,使他们能够把主要精力放在问题的求解和实现上。VisualBasic的出现,更加简化了 Windows程序界面的设计工作,只需要极少量的代码,就能实现标准 Windows应用程序的界面。但是,如果不了解 Windows程序界面设计的原则,或者不熟悉 VB下界面编程的技巧,就难以设计和实现既符合一般标准又具有特色的界面界面设计的原则界面设

46、计具有一般性的原则,最为重要的有:界面要具有一致性。一致性原则在界面设计中最容易被违反,同时也最容易修改和避免。例如,The same terms must be used in menus and online help; dialog boxes must have the same style.There are shortcuts to common operations. The frequency of operation sequence should be reduced by the frequent use of common operations. For example

47、, set shortcuts for common operations, such as opening, saving, saving, etc Shortcuts to common operations can not only improve the users work efficiency, but also make the interface simple and efficient in functional implementation.Provides simple error handling. The system should have the function

48、 of error handling. When errors occur, the system should be able to detect errors and provide simple and easy to handle error handling functions. After the error occurs, the state of the system does not change, or the system should provide guidance for error recovery.Providing information feedback.

49、Information feedback is necessary for the important operations of operators. Feedback on common and simple operations is not required, but the system should provide feedback on unusual operations and critical operations.Reversible operation. The operation should be reversible. This is quite useful for operators who do not have specialized knowledge. Reversible actions can be either a single operation or a relatively independent sequence of operations.Designing good online help. Online help is not essential for skilled users, but for most unskilled users, o

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 高等教育 > 大学课件

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报