Yes it is possible, follow example:
procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
f: Tform;
clicado : Integer;
begin
f:= createmessagedialog('Deseja Abrir outro Formulário?',
mtconfirmation,[mbyes,mbno,mbok,mbcancel]);
try
for i:=0 to f.componentCount -1 do
if f.components[i] is tbutton then
with tbutton(f.components[i]) do
case modalresult of
mryes : caption := '&Sim';
mrno : caption := '&Não';
mrok : caption := '&Certo';
mrcancel: caption := '&Errado';
end;
f.caption := 'Opções'; //Caption da Janelinha
//Aqui passamos o Código de qual o botão clicado
clicado := f.showmodal;
finally
f.free;
end;
if clicado = 6 then
begin
//Aqui você chama o formulário
end;
end;
Name of the available buttons and their respective Codes:
mrNone = 0;
mrOk = 1;
mrCancel = 2;
mrAbort = 3;
mrRetry = 4;
mrIgnore = 5;
mrYes = 6;
mrNo = 7;
mrClose = 8;
mrAll = 12;
mrNoToAll = 13;
mrYesToAll = 14;
Can you explain and contextualize it better? The text of the question is quite confused and this question is already with 3 votes to close as "is not clear enough" and "too wide". And none of these closing vows are mine.
– Victor Stafusa
I think it’s pretty clear, since the friend down there has perfectly attended to what I wanted.
– Guilherme Lima