我知道了一个答案
比如在form1中有三个标签 caption分倍为用户名,密码,修改密码。三个命令按钮为登录,修改密码(command2),确定。 三个text,
sub command2_...
dim a,b,c,d,e,f
b=freefile
open "d:\1.dat" for input as #b
do while not eof(b)
put #b,a
loop
close
if text2.text=a then 'text2为写密码的
text3.enable=true
end if
sub command3_click
c=text3.text
d=freefile
open "d:\1.dat" for append as #d
write #d,c
close
sub command1.click
e=freefile
open "d:\1.dat" for input as #e
do while not eof(e)
put #e,f
loop
close
if text1.text=f then
form2.show
else
msgbox"ffff"
end if
sub form_load
g=freefile
open "d:\1.dat" for output as #g
close