Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blocking parent form-window in Delphi

Tags:

forms

delphi

I'm trying to create a simple application that show two form-windows. The first one, the main form should be able to display a popup form-window when a bottom is clicked. The second form showed must disable the functionality of the main form.

Please show a simple code for this example.

like image 427
Gabriel Muñumel Avatar asked Dec 07 '22 18:12

Gabriel Muñumel


1 Answers

Try:

procedure ShowModalForm()
var 
  newForm: TNewForm;
begin
  newForm := TNewForm.Create(nil);
  try
    newForm.ShowModal;
  finally
    newForm.Free;
  end;
end;
like image 180
Marco Avatar answered Jan 26 '23 21:01

Marco