2022年人机交互用户界面设计实验报告.docx





《2022年人机交互用户界面设计实验报告.docx》由会员分享,可在线阅读,更多相关《2022年人机交互用户界面设计实验报告.docx(26页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、精品学习资源试验一图形用户界面的设计一 试验目的和要求1) 熟识图形用户界面的设计原就2) 利用一种设计工具完成图形化的用户界面设计二 试验内容与步骤一 试验内容:利用常用的设计工具 VC/VB/Delphi/PB等 完成一个通用图形用户界面设计,要遵循界面设计的一般原就 一样性、快捷方式、供应错误处理 ,留意颜色的使用,学会使用图标、按钮、屏幕布局、菜单和对话框的设计二试验步骤 1设计多个对话框,完成填表输入界面的设计,合理使用图标、按钮、颜色;2. 设计不同形式的菜单,完成对不同对话框的调用;3. 供应简洁的错误处理、联机帮忙三 界面例如1、登录界面2、主界面欢迎下载精品学习资源3代码:
2、登录界面:using System;using System.Drawing; using System.Collections;using System ponentModel; using System.Windows.Forms; using System.Data;欢迎下载精品学习资源using System.Data.OleDb;/ / Form1 的摘要说明;/ private System.Windows.Forms.Button btClose; private System.Windows.Forms.TextBox password; private System.Wind
3、ows.Forms.Label label3; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label1;private System.Windows.FormsboBox comboName;/ / 必需的设计器变量;/ private SystemponentModel.Container components = null; private System.Windows.Forms.Button btSure;private OleDbConnection oleConnect
4、ion1 = null;public Login/ Windows 窗体设计器支持所必需的/ InitializeComponent;/ TODO: 在 InitializeComponent 调用后添加任何构造函数代码/ / 清理全部正在使用的资源;/ protected override void Dispose bool disposing if disposing if components .= nullcomponents.Dispose;欢迎下载精品学习资源base.Dispose disposing ;#region Windows 窗体设计器生成的代码/ / 设计器支持所需的
5、方法 - 不要使用代码编辑器修改/ 此方法的内容;/ private void InitializeComponentSystemponentModelponentResourceManager resources = new SystemponentModelponentResourceManagertypeofLogin;this.btClose = new System.Windows.Forms.Button; this.btSure = new System.Windows.Forms.Button; this.password = new System.Windows.Forms.
6、TextBox; this.label3 = new System.Windows.Forms.Label; this.label2 = new System.Windows.Forms.Label; this.label1 = new System.Windows.Forms.Label;thisboName = new System.Windows.FormsboBox; this.SuspendLayout;/ btClose/this.btClose.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btClose.ForeC
7、olor = System.Drawing.Color.Black; this.btClose.Location = new System.Drawing.Point159, 220; this.btClose.Name = btClose;this.btClose.Size = new System.Drawing.Size75, 23; this.btClose.TabIndex = 27;this.btClose.Text = 取消;this.btClose.Click += new System.EventHandlerthis.btClose_Click;/ btSure/this.
8、btSure.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btSure.ForeColor = System.Drawing.Color.Black; this.btSure.Location = new System.Drawing.Point46, 220; this.btSure.Name = btSure;this.btSure.Size = new System.Drawing.Size75, 23; this.btSure.TabIndex = 26;this.btSure.Text = 确定;this.btSure
9、.Click += new System.EventHandlerthis.btSure_Click;欢迎下载精品学习资源/ password/this.password.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;this.password.Location = new System.Drawing.Point130, 136; this.password.Name = password; this.password.PasswordChar = *;this.password.Size = new System.Dr
10、awing.Size100, 21; this.password.TabIndex = 25;this.password.Text = admin;/ label3/this.label3.Font = new System.Drawing.Font宋体, , System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, byte134;this.label3.ForeColor = System.Drawing.Color.Black; this.label3.Location = new System.Drawing.P
11、oint66, 136; this.label3.Name = label3;this.label3.Size = new System.Drawing.Size56, 23; this.label3.TabIndex = 23;this.label3.Text = 密 码;/ label2/this.label2.Font = new System.Drawing.Font宋体, , System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, byte134;this.label2.ForeColor = System.
12、Drawing.Color.Black; this.label2.Location = new System.Drawing.Point66, 96; this.label2.Name = label2;this.label2.Size = new System.Drawing.Size56, 23; this.label2.TabIndex = 22;this.label2.Text = 用户名 ;/ label1/this.label1.Font = new System.Drawing.Font楷体_GB2312, 18F, System.Drawing.FontStyle.Bold,
13、System.Drawing.GraphicsUnit.Point, byte134;this.label1.ForeColor = System.Drawing.Color.Black; this.label1.Location = new System.Drawing.Point42, 48; this.label1.Name = label1;this.label1.Size = new System.Drawing.Size208, 28; this.label1.TabIndex = 21;this.label1.Text = 理财治理信息系统 ;欢迎下载精品学习资源/ comboN
14、ame/thisboName.Location = new System.Drawing.Point130, 96; thisboName.Name = comboName;thisboName.Size = new System.Drawing.Size104, 20; thisboName.TabIndex = 28;/ Login/this.AutoScaleBaseSize = new System.Drawing.Size6, 14; this.BackColor = System.Drawing.Color.SeaShell; this.BackgroundImage =Syste
15、m.Drawing.Imageresources.GetObject$this.BackgroundImage; this.ClientSize = new System.Drawing.Size298, 287; this.Controls.AddthisboName; this.Controls.Addthis.btClose; this.Controls.Addthis.btSure; this.Controls.Addthis.password; this.Controls.Addthis.label3;this.Controls.Addthis.label2;this.Control
16、s.Addthis.label1; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = Login; this.StartPosition =System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = 登录;this.Load += new System.EventHandlerthis.Login_Load; this.ResumeLayoutfalse;this.PerformLayout;#endregion/ / 应用程序的主入口点;/ ST
17、AThread static void MainApplication.Runnew MainForm;欢迎下载精品学习资源private void btSure_Clickobject sender, System.EventArgs etrystring sql=select uName,PWD from family where uName=+thisboName.Text +;ifoleConnection1=nulloleConnection1 = MainForm.getConnection; OleDbCommand cmd = oleConnection1.CreateComm
18、and; cmdmandText =sql;OleDbDataReader dr = cmd.ExecuteReader; if.dr.Read欢迎下载精品学习资源elseMessageBox.Show无此用户,请重试! , 提示; dr.Close;cmd.Dispose; return;if.dr.GetString1.Equals this.password.Text.ToString欢迎下载精品学习资源MessageBox.Shown密码错误,请重试! , 提示; dr.Close;cmd.Dispose; return;Menu mainmenu=MainFormthis.MdiPa
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2022 人机交互 用户界面 设计 实验 报告

限制150内