计算机应用 | 古代文学 | 市场营销 | 生命科学 | 交通物流 | 财务管理 | 历史学 | 毕业 | 哲学 | 政治 | 财税 | 经济 | 金融 | 审计 | 法学 | 护理学 | 国际经济与贸易
计算机软件 | 新闻传播 | 电子商务 | 土木工程 | 临床医学 | 旅游管理 | 建筑学 | 文学 | 化学 | 数学 | 物理 | 地理 | 理工 | 生命 | 文化 | 企业管理 | 电子信息工程
计算机网络 | 语言文学 | 信息安全 | 工程力学 | 工商管理 | 经济管理 | 计算机 | 机电 | 材料 | 医学 | 药学 | 会计 | 硕士 | 法律 | MBA
现当代文学 | 英美文学 | 通讯工程 | 网络工程 | 行政管理 | 公共管理 | 自动化 | 艺术 | 音乐 | 舞蹈 | 美术 | 本科 | 教育 | 英语 |

班级管理系统VB(一)毕业论文网(7)

2013-05-11 01:01
导读:nbsp; End If ElseIf y = 1 Then MsgBox ("请你先清空在写入内容后点添加") End If Else MsgBox "你不是管理员,请先登陆管理员", , "提示" End If End Sub Private Sub Command2_Cli
nbsp;        End If
        ElseIf y = 1 Then
            MsgBox ("请你先清空在写入内容后点添加")
        End If
Else
MsgBox "你不是管理员,请先登陆管理员", , "提示"
End If
End Sub

Private Sub Command2_Click()
y = 1
Dim c As Integer
Dim a As String
If o = 1 Then
  If CInt(Text3.Text) > CInt(Text4.Text) Or CInt(Text3.Text) = 0 Then
   MsgBox ("没有此记录")
   ElseIf CInt(Text3.Text) > 0 And CInt(Text3.Text) <= CInt(Text4.Text) Then
   c = CInt(Text3.Text)
   Open "d:\bjglxt\班级事件" For Random As #1
   Get #1, c, a
   If a = "" Then
    MsgBox ("您当时添加的是一条空记录")
    Text1.Text = a
   ElseIf a <> "" Then
   Text1.Text = a
  End If
  Close
 End If
ElseIf o = 0 Then
MsgBox ("请输入正确的记录号(只限数字且不要超出记录条数)")
End If
Timer1.Enabled = True
End Sub

Private Sub Command3_Click()
Text1.Text = ""
Text3.Text = ""
y = 0
End Sub

Private Sub Command4_Click()
End Sub

Private Sub Form_Load()
y = 0
o = 0
Dim c As Integer
Open "d:\bjglxt\班级事件\cc.txt" For Random As #2
Get #2, , c
Text4.Text = c
Close
End Sub
Private Sub Timer1_Timer()
If Text3.Text <> "" Then
o = 1
 If Text3.Text >= "a" And Text3.Text <= "z" Then
 'Timer1.Enabled = False
 MsgBox ("请输入正确的记录号(只限数字)")
 Text3.Text = ""
 End If (科教范文网 lw.AsEac.com编辑整理)
ElseIf Text3.Text = "" Then
  o = 0
End If
End Sub

 


6:班级荣誉:

代码分析:
Dim b As Integer
Dim o As Integer
Dim y As Integer
Private Sub Command1_Click()
Dim a As String
Dim q As Integer

If isadtr = True Then
    If y = 0 Then
            If Text1.Text = "" Then
                  q = MsgBox("你要添加一条空记录吗?", vbYesNo)
                  If q = 6 Then
                  b = Text4.Text
                  b = b + 1
                  a = Text1.Text
                  Open "d:\bjglxt\班级事件\cc.txt" For Random As #2
                  Open "d:\bjglxt\班级事件\dd.txt" For Random As #1
                  Put #1, b, a
                  Put #2, , b
                  Text4.Text = b
           &nb

上一篇:电表管理系统VB(一)毕业论文网 下一篇:没有了