Rob
Rob

Reputation: 2472

Delphi: How to call one form from another?

I am trying to create a more complex dialog type form (called frmComment), that uses a Tmemo field and some labels. I figured out that if I run frmComment.Show it will show the form, but processing does not stop. Basically, how do I get processing of the procedure to stop until the form is closed?

Or if this is not advisable, what is the best approach to create a more complex dialog-like form (that stops processing of the program and returns something useful).

Thanks

Upvotes: 4

Views: 2832

Answers (1)

David Heffernan
David Heffernan

Reputation: 612954

You just need to call ShowModal instead of Show and the dialog will be modal.

Modal dialogs disable the other windows in an application so that the modal dialog, and only the modal dialog, can receive input.

Upvotes: 7

Related Questions