学生信息登记系统

学生信息登记系统VB试验报告
二.控件属性变量

        对象 属性 设置
Form1 caption 首页
Label1 caption 2008年4月26日
Label2 caption 学生信息管理系统
Label3 caption 制作人:===
Commond1 caption 登陆
Commond2 caption 取消
Shape1 空 空

Form2 caption 登陆
Label1 caption 欢迎使用本系统
Label2 caption 用户名:
Label3 caption 用户密码
Label6 caption 登陆
Shape1 空 空
Commond1 caption 确定
Commond2 caption 取消

Form3 caption 学生信息管理系统
Label1 caption 姓名:
Label2 caption 学号:
Label3 caption 入学年月
Label4 caption 所在学院
Label5 caption 月
Label6 caption 学生信息登记系统
Label7 caption 年
Shape1 空 空
Text1 text 空
Text2 text 空
Combo1 text 空
Combo2 text 空
Combo3 text 空
List1 空 空
Commond1 caption 退出
Commond2 caption 添加
Commond3 caption 删除
Commond4 caption 清空

三.程序清单
FORM1
Private Sub Command1_Click()
Form2.Show
End SubPrivae Sub Label5_Click()
End SubPrivate Sub Command2_Click()
End
End SubFORM2
Private Sub Picture1_Click()End SubPrivate Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single)End SubPrivate Sub Command1_Click()
If Text1.Text = "ABC" And Text2.Text = "123" Then
Form3.ShowElse
AA = MsgBox("用户名或密码不正确,请重新输入", vbOKOnly, "警告")
Text1.Text = ""
Text2.Text = ""
End If
End SubPrivate Sub Command2_Click()
Unload Me
End Sub
FORM3
Private Sub Command1_Click()
Unload Me
End SubPrivate Sub Command2_Click()
Dim i
If Text2.Text <> "" Then
i = Text1.Text & " " & " " & Combo2.Text & "年" & Combo3.Text & "入学" & " " & " " & " " & " " & "学号:" & 751com.cn
End If
If Text1.Text = "" Then
MsgBox "请输入姓名", vbOKOnly + EXCLAMATION, "警告"
End If
If Not IsNumeric(Trim(Text2.Text)) Then
MsgBox "请勿重复注册", vbOKOnly + EXCLAMATION, "警告"
Exit Sub
Text2.SetFocus
End If
Text1.Text = ""
Text2.Text = ""
End SubPrivate Sub Command3_Click()
Dim i As Integer
If List1.ListIndex >= 0 Then
   For i = List1.ListCount - 1 To 0 Step -1
     If List1.Selected(i) Then List1.RemoveItem i
      '删除被选中的项目
    Next i
End If
End SubPrivate Sub Command4_Click()
List1.Clear     '清空列表
End SubPrivate Sub Form_Load()
Combo2.AddItem 2002
Combo2.AddItem 2003
Combo2.AddItem 2004
Combo2.AddItem 2005
Combo2.AddItem 2006
Combo3.AddItem "9月"
Combo3.AddItem "12月"
Combo4.AddItem "外语学院"
Combo4.AddItem "电信学院"
Combo4.AddItem "工程学院"
Combo4.AddItem "商学院"
Combo3.Text = Combo3.List(0)
Combo2.Text = Combo2.List(4)
Combo4.Text = Combo4.List(1)
End SubPrivate Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then SendKeys "{tab}"
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then SendKeys "{tab}"
End Sub190

  • 上一篇文章:
  • 下一篇文章:
  • Copyright © 2007-2012 www.chuibin.com 六维论文网 版权所有