资源描述:
《VB txt 读取调用》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、程序截图:菜单截图如上代码如下:PrivateSubhead1_Click()Dima(30)AsIntegerDimb(30)AsStringDimc(30)AsIntegerDimd(30)AsIntegerDime(30)AsIntegerDimf(30)AsIntegerDimg(30)AsIntegerDimm(30)AsStringOpen"C:DocumentsandSettingsAdministrator桌面vbxscj.txt"ForInputAs#1Text1.Text=""&"学号"&""&"姓名"&""&"英语"&"
2、"&"数学"&""&"计算机"&""&"历史"&""&"体育"&vbCrLfDoWhileNotEOF(1)i=i+1Input#1,a(i),b(i),c(i),d(i),e(i),f(i),g(i)Text1.Text=Text1&vbCrLf&""&a(i)&""&b(i)&""&c(i)&""&d(i)&""&e(i)&""&f(i)&""&g(i)&vbCrLfLoopClose#1EndSubPrivateSubjsj_Click()Dima(30)AsIntegerDimb(30)AsStringDimc(30)AsIntegerDimd
3、(30)AsIntegerDime(30)AsIntegerDimf(30)AsIntegerDimg(30)AsIntegerDimm(30)AsStringOpen"C:DocumentsandSettingsAdministrator桌面vbxscj.txt"ForInputAs#1Text1.Text=""&"学号"&""&"姓名"&""&"计算机"&vbCrLfDoWhileNotEOF(1)i=i+1Input#1,a(i),b(i),c(i),d(i),e(i),f(i),g(i)Text1.Text=Text1&vbCrLf&
4、""&a(i)&""&b(i)&""&e(i)&vbCrLfLoopClose#1EndSubPrivateSubls_Click()Dima(30)AsIntegerDimb(30)AsStringDimc(30)AsIntegerDimd(30)AsIntegerDime(30)AsIntegerDimf(30)AsIntegerDimg(30)AsIntegerDimm(30)AsStringOpen"C:DocumentsandSettingsAdministrator桌面vbxscj.txt"ForInputAs#1Text1.Te
5、xt=""&"学号"&""&"姓名"&""&"历史"&vbCrLfDoWhileNotEOF(1)i=i+1Input#1,a(i),b(i),c(i),d(i),e(i),f(i),g(i)Text1.Text=Text1&vbCrLf&""&a(i)&""&b(i)&""&f(i)&vbCrLfLoopClose#1EndSubPrivateSubshx_Click()Dima(30)AsIntegerDimb(30)AsStringDimc(30)AsIntegerDimd(30)AsIntegerDime(30)AsIntegerDimf(30
6、)AsIntegerDimg(30)AsIntegerDimm(30)AsStringOpen"C:DocumentsandSettingsAdministrator桌面vbxscj.txt"ForInputAs#1Text1.Text=""&"学号"&""&"姓名"&""&"数学"&vbCrLfDoWhileNotEOF(1)i=i+1Input#1,a(i),b(i),c(i),d(i),e(i),f(i),g(i)Text1.Text=Text1&vbCrLf&""&a(i)&""&b(i)&""&d(i)&vbCrLfLoopClos
7、e#1EndSubPrivateSubty_Click()Dima(30)AsIntegerDimb(30)AsStringDimc(30)AsIntegerDimd(30)AsIntegerDime(30)AsIntegerDimf(30)AsIntegerDimg(30)AsIntegerDimm(30)AsStringOpen"C:DocumentsandSettingsAdministrator桌面vbxscj.txt"ForInputAs#1Text1.Text=""&"学号"&""&"姓名"&""&"体育"&vbCrLfDoWhi
8、leNotEOF(1)i=i+1Input#1,a(i),b(i),c(i),d(i),e(i