极其简单的问题 :) 请进>>
我在做用户登入窗体的时候 在主窗体的OnShow事件中
使用以下语句:
With TLogFrm.Create(Application) do
Try
ShowModal;
Finally
free;
end;
在登入窗体的"登入"Button的OnClick事件进行密码的核对
begin
Table_user.close;
with Table_user do
begin
open;
if locate('UserName',Combobox1.text,[]) then
if fieldbyName('Password').asstring=edtPwd.text then
close
else
begin
if Application.MessageBox('密码错误!是否重新输入?',pchar('错误'),MB_YesNo+MB_ICONERROR)<>IDYes then
application.Terminate
else edtPwd.SetFocus;
end;
end;
问题是:当用户密码核对正确后,按"登入"没反应,不能关闭登入窗体,
用LogFrm.free,LogFrm.hide也不行,请指正!谢谢