if (edit1.Text='5')and(edit2.Text='5') then
form1.Visible:=false
else
for i := 0 to groupbox1.ControlCount-1 do
if groupbox1.Controls[i] is Tedit then
Tedit(groupbox1.Controls[i]).Clear;
showmessage('请核对用户名或密码'); if form1.Visible=false then
form2.ShowModal;
我输入正确 还弹出来‘请核对用户名或密码’ 请问吧这句showmes放在哪里合适 应该只有错误的时候才弹出来
form1.Visible:=false
else
for i := 0 to groupbox1.ControlCount-1 do
if groupbox1.Controls[i] is Tedit then
Tedit(groupbox1.Controls[i]).Clear;
showmessage('请核对用户名或密码'); if form1.Visible=false then
form2.ShowModal;
我输入正确 还弹出来‘请核对用户名或密码’ 请问吧这句showmes放在哪里合适 应该只有错误的时候才弹出来
form1.Visible:=false
else
for i := 0 to groupbox1.ControlCount-1 do begin
if groupbox1.Controls[i] is Tedit then
Tedit(groupbox1.Controls[i]).Clear;
showmessage('请核对用户名或密码'); end;
begin
Tedit(groupbox1.Controls[i]).Clear;
showmessage('请核对用户名或密码');
end;
form1.Visible:=false
else begin
for i := 0 to groupbox1.ControlCount-1 do
if groupbox1.Controls[i] is Tedit then
Tedit(groupbox1.Controls[i]).Clear;
showmessage('请核对用户名或密码'); end;
begin
Tedit(groupbox1.Controls[i]).Clear;
showmessage('请核对用户名或密码'); end;
form1.Visible:=false
else begin
for i := 0 to groupbox1.ControlCount-1 do
if groupbox1.Controls[i] is Tedit then
Tedit(groupbox1.Controls[i]).Clear;
showmessage('请核对用户名或密码'); end;
按F4运行,运行到鼠标所在行后,按F8一步步看到了哪里。
然后,类似问题,都是可以解决的。
@_@
if (edit1.Text='5')and(edit2.Text='5') then
form1.Visible:=false
else
for i := 0 to groupbox1.ControlCount-1 do
if groupbox1.Controls[i] is Tedit then
begin
Tedit(groupbox1.Controls[i]).Clear;
showmessage('请核对用户名或密码');
end;
if form1.Visible=false then
form2.ShowModal;