我写了一个通过检查checkbox提醒用户设置查询条件的函数,老是运行不过去,请指教。(50分)

C

ccll

Unregistered / Unconfirmed
GUEST, unregistred user!
function funckeckoneleast(sender: TForm): boolean;
var
i:integer;
begin
result:=false;
for i:=0 to Sender.ComponentCount-1 do
begin
if Sender.Components is TCheckBox then
begin
if (sender.Components as TCheckBox).checked then
begin
result:=true ;
break;
end;
end;
end;
if result=true then exit
else
begin
if MessageDlg('不设置可能会占用很多时间,继续吗?',mtConfirmation,
[mbYes,mbNo],0)=mrYes
then result:=true;
end;
end;
 
可以运行啊,是不是你放的地方不对,把函数放在{$R *.DFM}之后就可以了
 
没什么问题啊,你运行时出现什么错误提示呢?
 
顶部