请教:
procedure TSetEquipmentTimeForm.Edit1Exit(Sender: TObject);var
i:integer;//判断世纪设置是否正确
begin i:=strtoint(edit1.Text);
if (edit2.SetFocus) or (edit3.SetFocus) or(Button1.SetFocus) and (i<20) then
begin
showmessage('世纪设置错误');
edit1.SetFocus;
end;
end;当我从光标从 edit1 出来,如果是 edit2 或者 edit3 或者 Button1 获得 句本(我不知道是不是叫句本,也就是说,我把光标 移入 edit2 或者 edit3 或者 双击 Button1)
则运行
showmessage('世纪设置错误');
edit1.SetFocus;如果是别的 控件获的 剧本(也就是我 我把光标 移入 edit5 或者 双击 Button2 )则
不进行判断!
各位大哥,这样的功能能实现吗?
谢谢各位大哥!
procedure TSetEquipmentTimeForm.Edit1Exit(Sender: TObject);var
i:integer;//判断世纪设置是否正确
begin i:=strtoint(edit1.Text);
if (edit2.SetFocus) or (edit3.SetFocus) or(Button1.SetFocus) and (i<20) then
begin
showmessage('世纪设置错误');
edit1.SetFocus;
end;
end;当我从光标从 edit1 出来,如果是 edit2 或者 edit3 或者 Button1 获得 句本(我不知道是不是叫句本,也就是说,我把光标 移入 edit2 或者 edit3 或者 双击 Button1)
则运行
showmessage('世纪设置错误');
edit1.SetFocus;如果是别的 控件获的 剧本(也就是我 我把光标 移入 edit5 或者 双击 Button2 )则
不进行判断!
各位大哥,这样的功能能实现吗?
谢谢各位大哥!
i:integer;//判断世纪设置是否正确
begin i:=strtoint(edit1.Text);
if (edit2.Focused) or (edit3.Focused) or(Button1.Focused) and (i<20) then
begin
showmessage('世纪设置错误');
edit1.SetFocus;
end;
end;
fox100 的方法很好啊!
揭贴!