《人机交互用户界面设计实验报告材料.docx》由会员分享,可在线阅读,更多相关《人机交互用户界面设计实验报告材料.docx(8页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、人机交互用户界面设计实验报告材料 实验一图形用户界面的设计 一实验目的和要求 1) 熟悉图形用户界面的设计原则 2)利用一种设计工具完成图形化的用户界面设计 二实验容与步骤 (一) 实验容: 利用常用的设计工具(VC/VB/Delphi/PB等)完成一个通用图形用户界面设计,要遵循界面设计的一般原则(一致性、快捷方式、提供错误处理),注意颜色的使用,学会使用图标、按钮、屏幕布局、菜单和对话框的设计 (二)实验步骤 1设计多个对话框,完成填表输入界面的设计,合理使用图标、按钮、颜色; 2设计不同形式的菜单,完成对不同对话框的调用; 3提供简单的错误处理、联机帮助 三界面示例 1、登录界面 2、主
2、界面 3代码: 登录界面: using System; using System.Drawing; using System.Collections; using ponentModel; using System.Windows.Forms; using System.Data; using System.Data.OleDb; / Download by namespace er / / Form1 的摘要说明。 / public class Login : System.Windows.Forms.Form private System.Windows.Forms.Button btCl
3、ose; private System.Windows.Forms.TextBox password; private bel label3; private bel label2; private bel label1; private boBox comboName; / / 必需的设计器变量。 / private ponentModel.Container components = null; private System.Windows.Forms.Button btSure; private OleDbConnection oleConnection1 = null; public
4、Login() / / Windows 窗体设计器支持所必需的 / InitializeComponent(); / / TODO: 在InitializeComponent 调用后添加任何构造函数代码 / / / 清理所有正在使用的资源。 / protected override void Dispose( bool disposing ) if( disposing ) if (components != null) components.Dispose(); base.Dispose( disposing ); #region Windows 窗体设计器生成的代码 / / 设计器支持所需
5、的方法- 不要使用代码编辑器修改 / 此方法的容。 / private void InitializeComponent() ponentResourceManager resources = new ponentResourceManager(typeof(Login); this.btClose = new System.Windows.Forms.Button(); this.btSure = new System.Windows.Forms.Button(); this.password = new System.Windows.Forms.TextBox(); bel3 = new
6、bel(); bel2 = new bel(); bel1 = new bel(); boName = new boBox(); this.SuspendLayout(); / / btClose / this.btClose.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btClose.ForeColor = System.Drawing.Color.Black; this.btClose.Location = new System.Drawing.Point(159, 220); = btClose; this.btClose
7、.Size = new System.Drawing.Size(75, 23); this.btClose.TabIndex = 27; this.btClose.Text = 取消; this.btClose.Click += new System.EventHandler(this.btClose_Click); / / btSure / this.btSure.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btSure.ForeColor = System.Drawing.Color.Black; this.btSure.Location = new System.Drawing.Point(46, 220); = btSure; this.btSure.Size = new System.Drawing.Size(75, 23); this.btSure.TabIndex = 26; this.btSure.Text = 确定; this.btSure.Click += new System.EventHandler(this.btSure_Click);
限制150内