(vb)vb高手请来,不来的终生后悔!

来源:百度知道 编辑:UC知道 时间:2024/05/08 01:12:02
(vb)text1中的文本,是要保存到“\用户信息.txt”中的,但是如果要保存在记事本中已有或相同,那就提示“已注册”
KLLSo!你注意看你的回答,还可能啊!前面是output后面是input!

open "用户信息.txt" for input as #1
do while not eof(1)
line input #1,temp
str1=str1 & temp
loop
close #1
if instr(str1,text1.text)>0 then
msgbox "已注册"
else
..
end if

open "用户信息.txt" for input as #1
do while not eof(1)
line input #1,temp
str1=str1 & temp
loop
close #1
if instr(str1,text1.text)>0 then
msgbox "已注册"
else
..

你是要保存文件吧?哈哈,还以为什么呢.
参考楼上的。建议你看下书,里面有关于随机文件和顺序文件的介绍,希望对你有帮助!!

我是低手,来了很后悔,就不回答了!

Private Sub Form_Load()
'添加这些控件(
Text1 = "123"
Command1.Caption = "确定"
')
End Sub
Private Sub Command1_Click() '单击“确定”后
Dim ReDat As String
Dim ReAllDat As String
Open App.Path & "\用户信息.txt" For Input As #1 '读入所有信息
Do While Not EOF(1)
Line Input #1, ReDat
ReAllDat = ReAllDat & ReD