procedure tform1.bitbtnclick(sender:tobject);
varpwdfile:textfile;
pwdstr:string;
begin
ifcheckbox1.checked=true then
assignfile((pwdfile,'d:\data\管理员.cfg')
else
assignfile(pwdfile,'d:\data\学生.cfg');
reset(pwdfile);
readln(pwdfile,pwdstr);
closefile(pwdfile);
times:=times+1;
if edit1.text=pwdstr then
begin
if checkbox1.checked=truethenform5.show;
elseform7.show;
end
else
begin
if messagedlg('错误',mtcomfirmation,[mbyes,mbno],0)=mryes then
close
else if times<3 then edit1.setfocus
else
begin
messagedlg('错误',mtinformation,[mbok],0);
application.terminate;
end;
end;
end;
这是一段登陆窗口源程序,问cfg文件如何生成,TEXTFILE生成CFG文件用笔记本能打开。
varpwdfile:textfile;
pwdstr:string;
begin
ifcheckbox1.checked=true then
assignfile((pwdfile,'d:\data\管理员.cfg')
else
assignfile(pwdfile,'d:\data\学生.cfg');
reset(pwdfile);
readln(pwdfile,pwdstr);
closefile(pwdfile);
times:=times+1;
if edit1.text=pwdstr then
begin
if checkbox1.checked=truethenform5.show;
elseform7.show;
end
else
begin
if messagedlg('错误',mtcomfirmation,[mbyes,mbno],0)=mryes then
close
else if times<3 then edit1.setfocus
else
begin
messagedlg('错误',mtinformation,[mbok],0);
application.terminate;
end;
end;
end;
这是一段登陆窗口源程序,问cfg文件如何生成,TEXTFILE生成CFG文件用笔记本能打开。
解决方案 »
- 600分求解!!delphi7开发ISAPI网络服务器端程序时的UTF8问题, 内附源码
- 网络数据同步问题
- 我使用clientdataset将数据库下载下来后,用什么方法查询clientdataset里的数据,而不会又去访问数据库呢
- 在Delphi5中怎么才能得到网卡的Mac地址
- 读取bmp出错?
- dephi 6下对ComboBox有OnSelect事件,而delphi 5中没有,5中怎么实现类似功能?
- 谁知道哪里有可以用在C++ Builder5下的DevExpress控件下载呀?
- 很菜的问题---DBGRID如何清空?
- 请问,哪里有borland pascal 7.0的程序下载??
- 怎样将客户端发送过来的数据插入到SQL数据库中,最好有程序
- 非常奇怪的问题,征解100分
- 使用Indy9使我好郁闷,各位请帮忙解决
你自己在记事本里写用户和密码,保存成ini文件,一个管理员,一个学生的
这样一般能用记事本打开,如果不行,你到文件夹选项改他的打开方式