ShowModal (Delphi)
Description
This code brings up the modal dialog from Unit2 when a button is clicked. It causes a Beep if the OK button is clicked. Implement the modal form in Unit2 and then put Unit2 in the uses clause for this module.
Code
procedure TForm1.Button1Click(Sender: TObject);
begin
if MyDialogBox1.ShowModal = mrOK then
Beep;
end;
Uses
- Vcl.Forms.TCustomForm.ModalResult ( fr | de | ja )
- Vcl.Forms.TCustomForm.ShowModal ( fr | de | ja )