网学网为需要VB类作品的朋友们搜集整理了基于VB大型电气设备管理系统的设计相关资料,希望对各位网友有所帮助!
客服咨询,网学网竭诚为您服务,本站永久域名:myeducs.cn |
第四章 设备管理系统的实现 4.1、数据库的连接 Public dbmain As Database Sub opendb() allfilepath = "" Set dbmain = OpenDatabase(allfilepath & "data\beijianku.mdb") On Error GoTo errhandel: Exit Sub errhandel: MsgBox ("数据库打开出错(路径错误),请与编程者联系处理。") End Sub 4.2、主界面模块说明 随着计算机技术的不断发展,计算机应用于各大领域,给人们的生活带来了极大的便利,人们的生活水平也得到很大提高,更加喜欢追求美好事物,因此,任何事物的第一印象是非常重要。 前台界面是给用户提供一个方便易用的接口和美观友好的界面,它满足拥护的各种查询、修改和删除综合实现。事之今日,系统开发工具不断升级,软件的功能越来越强大,利用先进的技术设计新颖、大方的界面,让用户接受也是越来越显的重要。本系统没有用户名登录方式,而是用一个计时器直接进入主界面,设计如图: Option Explicit Private Sub Form_Load() startime = 0 Timer1.Enabled = True End Sub Private Sub Timer1_Timer() startime = startime + 1 ProgressBar1.Visible = True ProgressBar1.Value = startime * 5 Label5.Caption = startime * 5 & "%" If startime >= 20 Then Timer1.Enabled = False MDifrm.Show Frmstart.Hide End If DoEvents End Sub接下来在Visual Basic6.0自带功能”菜单编辑器”编辑窗体界面中的相关数据信息,形成的前台用户界面如图: 前台是用户进行综合管理、进入其它操作模块的唯一的接口,主要连接的界面窗口有: 数据处理、数据查询、成本核算三个功能模 数据处理包括新设备的添加、修改、删除;及领用设备和消耗设备的修改、删除。 数据查询包括库设备、领用设备和消耗设备的查询。 成本核算包括对每月设备的运行状态(领用、消耗)以领用报表、消耗报表、班组报表和个人报表四表分别进行统计分析。 4.3、数据查询管模块分析与实现 设备信息数据查询,数据查询包括库设备查询、领用查询、消耗查询三部分,不同的查询模块有不同的查询方式,库设备查询、消耗查询都是以设备的属性进行查找,而领用查询以设备在每一阶段的运动情况进行查找的,同时还分别以详细列表、与汇总表两种方式显示在ListView框格中,上图是库设备查询的显示: Option Explicit Private Sub Check1_Click(Index As Integer) Select Case Index Case 0 If Check1(0).Value = 1 Then Combo1(0).Enabled = True Combo1(0).BackColor = &H80000005 Else Combo1(0).Enabled = False Combo1(0).BackColor = &H End If Case 1 If Check1(1).Value = 1 Then Combo1(1).Enabled = True Combo1(1).BackColor = &H80000005 Else Combo1(1).Enabled = False Combo1(1).BackColor = &H End If Case 2 If Check1(2).Value = 1 Then Combo1(2).Enabled = True Combo1(2).BackColor = &H80000005 Else Combo1(2).Enabled = False Combo1(2).BackColor = &H End If Case 3 If Check1(3).Value = 1 Then Combo1(3).Enabled = True Combo1(3).BackColor = &H80000005 Else Combo1(3).Enabled = False Combo1(3).BackColor = &H End If End Select End Sub Private Sub Check2_Click(Index As Integer) Select Case Index Case 0 If Check2(0).Value = 1 Then Combo2(0).Enabled = True Combo2(0).BackColor = &H80000005 Else Combo2(0).Enabled = False Combo2(0).BackColor = &H End If Case 1 If Check2(1).Value = 1 Then Combo2(1).Enabled = True Combo2(1).BackColor = &H80000005 Else Combo2(1).Enabled = False Combo2(1).BackColor = &H End If Case 2 If Check2(2).Value = 1 Then Combo2(2).Enabled = True Combo2(2).BackColor = &H80000005 Else Combo2(2).Enabled = False Combo2(2).BackColor = &H End If Case 3 If Check2(3).Value = 1 Then Combo2(3).Enabled = True Combo2(3).BackColor = &H80000005 Else Combo2(3).Enabled = False Combo2(3).BackColor = &H End If Case 4 If Check2(4).Value = 1 Then Combo3.Enabled = True Combo3.BackColor = &H80000005 Text2(0).Enabled = True Text2(0).BackColor = &H80000005 Else Combo3.Enabled = False Combo3.BackColor = &H Text2(0).Enabled = False Text2(0).BackColor = &H End If Case 5 If Check2(5).Value = 1 Then Combo4.Enabled = True Combo4.BackColor = &H80000005 Text2(1).Enabled = True Text2(1).BackColor = &H80000005 Else Combo4.Enabled = False Combo4.BackColor = &H Text2(1).Enabled = False Text2(1).BackColor = &H End If Case 6 If Check2(6).Value = 1 Then Text2(2).Enabled = True Text2(2).BackColor = &H80000005 Else Text2(2).Enabled = False Text2(2).BackColor = &H End If Case 7 If Check2(7).Value = 1 Then Combo2(7).Enabled = True Combo2(7).BackColor = &H80000005 Else Combo2(7).Enabled = False Combo2(7).BackColor = &H End If Case 8 If Check2(8).Value = 1 Then Cobriqi1(12).Enabled = True Cobriqi1(12).BackColor = &H80000005 Cobriqi1(13).Enabled = True Cobriqi1(13).BackColor = &H80000005 Cobriqi1(14).Enabled = True Cobriqi1(14).BackColor = &H80000005 Cobriqi1(18).Enabled = True Cobriqi1(18).BackColor = &H80000005 Cobriqi1(19).Enabled = True Cobriqi1(19).BackColor = &H80000005 Cobriqi1(20).Enabled = True Cobriqi1(20).BackColor = &H80000005 Else Cobriqi1(12).Enabled = False Cobriqi1(12).BackColor = &H Cobriqi1(13).Enabled = False Cobriqi1(13).BackColor = &H Cobriqi1(14).Enabled = False Cobriqi1(14).BackColor = &H Cobriqi1(18).Enabled = False Cobriqi1(18).BackColor = &H Cobriqi1(19).Enabled = False Cobriqi1(19).BackColor = &H Cobriqi1(20).Enabled = False Cobriqi1(20).BackColor = &H End If Case 9 If Check2(9).Value = 1 Then Cobriqi1(15).Enabled = True Cobriqi1(15).BackColor = &H80000005 Cobriqi1(16).Enabled = True Cobriqi1(16).BackColor = &H80000005 Cobriqi1(17).Enabled = True Cobriqi1(17).BackColor = &H80000005 Cobriqi1(21).Enabled = True Cobriqi1(21).BackColor = &H80000005 Cobriqi1(22).Enabled = True Cobriqi1(22).BackColor = &H80000005 Cobriqi1(23).Enabled = True Cobriqi1(23).BackColor = &H80000005 Else Cobriqi1(15).Enabled = False Cobriqi1(15).BackColor = &H Cobriqi1(16).Enabled = False Cobriqi1(16).BackColor = &H Cobriqi1(17).Enabled = False Cobriqi1(17).BackColor = &H Cobriqi1(21).Enabled = False Cobriqi1(21).BackColor = &H Cobriqi1(22).Enabled = False Cobriqi1(22).BackColor = &H Cobriqi1(23).Enabled = False Cobriqi1(23).BackColor = &H End If
|
本站发布的计算机毕业设计均是完整无错的全套作品,包含开题报告+程序+论文+源代码+翻译+答辩稿PPT |
本文选自计算机毕业设计http://myeducs.cn |