学生成绩考核 统计系统
vb.net
输入 学生 考号:姓名:班级:成绩:插入到文本存储库中 读取文本中的信息
搜索固定信息 显示
Public Class Form1 Private Sub button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles button1.Click Dim xh,bj,sname As String Dim mark As Double fileOpen(1,"d:\data.txt",OpenMode.Append) xh = TextBox1.Text sname = TextBox2.Text bj = TextBox3.Text mark = TextBox4.Text Writeline(1,xh,sname,mark) MsgBox("写入成功") fileClose() End Sub Private Sub button2_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles button2.Click Label5.Visible = True TextBox5.Visible = True Dim data As String fileOpen(1,"D:\data.txt",OpenMode.input) While Not EOF(1) data = lineinput(1) 'Chr(13)表示空格 Chr(10)表示换行 TextBox5.Text = TextBox5.Text & data & Chr(13) & Chr(10) End While fileClose(1) End Sub Private Sub button3_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles button3.Click TextBox5.Text = "" End Sub Private Sub button4_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles button4.Click Dim data As String fileOpen(1,OpenMode.input) While Not EOF(1) data = lineinput(1) 'Chr(13)表示空格 Chr(10)表示换行 If InStr(data,TextBox6.Text) Then TextBox5.Text = Replace(data,"","") & Chr(13) & Chr(10) End If End While fileClose(1) End Sub Private Sub button5_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles button5.Click Dim data As String fileOpen(1,OpenMode.Output) While Not EOF(1) data = lineinput(1) 'Chr(13)表示空格 Chr(10)表示换行 If InStr(data,TextBox6.Text) Then Printline(Replace(data,)) End If End While fileClose(1) End SubEnd Class
显示效果:
总结
以上是内存溢出为你收集整理的vb.net ---- 学生考试成绩统计生成系统.txt全部内容,希望文章能够帮你解决vb.net ---- 学生考试成绩统计生成系统.txt所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)