【编者按】网学网VB类作品频道为大家收集整理了“学生档案信息管理“提供大家参考,希望对大家有所帮助!
客服咨询,网学网竭诚为您服务,本站永久域名:myeducs.cn |
第五章 附录程序清单及注释 清单如下: 登录部分 Private Sub cmdCancel_Click() End End Sub Private Sub cmdOK_Click() ''检查正确的密码 If combo1.Text = "1" And txtPassword = "1" Or combo1.Text = "" And txtPassword = "" Then ''将代码放在这里传递 ''成功到 calling 函数 ''设置全局变量时最容易的 LoginSucceeded = True Me.Hide Form2.Show txtPassword = "" Else MsgBox "用户名或密码错误,请重试!", , "登录" combo1.SetFocus txtPassword = "" SendKeys "{Home}+{End}" End If End Sub 主窗体 Private Sub bz_Click() Form7.Show End Sub Private Sub chaxun_Click() Form5.Show 1 End Sub Private Sub close_Click() End End Sub Private Sub Command1_Click(Index As Integer) If Index = 0 Then Adodc2.Recordset.MoveFirst End If If Index = 1 Then If Adodc2.Recordset.BOF Then Adodc2.Recordset.MoveLast Else Adodc2.Recordset.MovePrevious End If End If If Index = 2 Then If Adodc2.Recordset.EOF Then Adodc2.Recordset.MoveFirst Else Adodc2.Recordset.MoveNext End If End If If Index = 3 Then Adodc2.Recordset.MoveLast End If End Sub Private Sub dangan_Click() Form3.Show End Sub Private Sub Form_Load() Dim i As Integer Dim str As String Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\data.MDe;Persist Security Info=False" Adodc1.CommandType = adCmdText SQL = "select * from data order by 学号" Adodc1.RecordSource = SQL Adodc1.Refresh str = "select 学号,学期,科目,成绩 from chengji where 学号 = " & Val(Text1.Text) & " order by 学期" ''MsgBox str Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\data.MDe;Persist Security Info=False" Adodc2.CommandType = adCmdText SQL = str Adodc2.RecordSource = SQL tablename = "orders" Adodc2.Refresh Set DataGrid1.DataSource = Adodc2 DataGrid1.Refresh End Sub Private Sub Text1_Change() Dim i As Integer Dim str As String str = "select 学号,学期,科目,成绩 from chengji where 学号 = " & Val(Text1.Text) & " order by 学期" ''MsgBox str SQL = str Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\data.MDe;Persist Security Info=False" Adodc2.CommandType = adCmdText Adodc2.RecordSource = SQL tablename = "orders" Adodc2.Refresh Set DataGrid1.DataSource = Adodc2 DataGrid1.Refresh End Sub Private Sub xiugai_Click() Form1.Show 1 End Sub Private Sub xiugai1_Click() Form6.Show 1 End Sub Option Explicit Dim FileName As String ''文件名,用于打开、保存文件 Dim UndoString As String ''用于 Undo 操作 Dim UndoNew As String ''用于 Undo 操作 Private Sub ImgUndoDisable() ''禁用“Undo”按钮 UndoString = "" UndoNew = "" ImgUndo.Enabled = False ImgUndo.Picture = ImageDisable.ListImages("Undo").Picture End Sub Private Sub ImgUndoEnable() ''有效“Undo”按钮 ImgUndo.Enabled = True ImgUndo.Picture = ImageUp.ListImages("Undo").Picture End Sub Private Sub Check_ImgPaste() ''设置粘贴按钮 If Len(Clipboard.GetText) > 0 Then ImgPaste.Enabled = True ImgPaste.Picture = ImageUp.ListImages("Paste").Picture Else ImgPaste.Enabled = False ImgPaste.Picture = ImageDisable.ListImages("Paste").Picture End If End Sub Private Sub Check_ImgCutCopy() ''设置剪切、复制按钮 If Text1.SelLength > 0 Then ImgCut.Enabled = True ImgCut.Picture = ImageUp.ListImages("Cut").Picture ImgCopy.Enabled = True ImgCopy.Picture = ImageUp.ListImages("Copy").Picture Else ImgCut.Enabled = False ImgCut.Picture = ImageDisable.ListImages("Cut").Picture ImgCopy.Enabled = False ImgCopy.Picture = ImageDisable.ListImages("Copy").Picture End If End Sub Private Sub BackColor_Click() CommonDialog1.ShowColor Text1.BackColor = CommonDialog1.Color End Sub |
本站发布的计算机毕业设计均是完整无错的全套作品,包含开题报告+程序+论文+源代码+翻译+答辩稿PPT |
本文选自计算机毕业设计http://myeducs.cn |