close
procedure TForm1.Button1Click(Sender: TObject);
var DialogForm : tform;
i:integer;
begin
DialogForm := CreateMessageDialog('請輸入大於或小於',mtInformation,[mbYes, mbNo]);
DialogForm.Caption := '搜尋日期';
for i := 0 to DialogForm.controlCount-1 do begin
if DialogForm.controls[i] is tButton then
with tButton(DialogForm.controls[i]) do begin
if Name = 'Yes' then caption := '大於';
if Name = 'No' then caption := '小於';
end;
end;
showmessage(inttostr(DialogForm.showmodal));
end;
文章標籤
全站熱搜