The DataCAD Developer Network (DDN) is an online resource for information and support for DCAL® (DataCAD Applications Language) developers as well as anyone interested in creating fonts, toolbars, hatch patterns, or linetypes for use in DataCAD.
#78604 by Mark F. Madura
Wed Aug 19, 2020 2:19 pm
When I create modal dialogs I almost always use Create(nil). Have you tried that?

Here's an article on the subject I came across a while back:

TForm.Create(AOwner)
Picking the right parameter to optimize memory usage
#78605 by dhs
Wed Aug 19, 2020 2:51 pm
Thanks Mark,
Yes, using nil (as per your suggestion and the article you referenced) solves the problem.
I think I may have been aware of that at some stage in the past, but had obviously forgotten about it, so much appreciate your response.
David
#78609 by dhs
Thu Aug 20, 2020 4:09 pm
... actually, using nil in the create hasn't fixed it. Immediately after changing it to nil I tested and it was working as expected (on closing the file dialog DataCAD was the top window), but this morning it is consistently not working. I haven't changed anything since yesterday (still using nil in the create), so am at a bit of a loss to explain.
The problem is only occurring with TOpenDialog (there are a couple other forms that are created, displayed modally and then freed by the macro and the same problem does not exist with these). I can live with the issue and will put back the code that restores DataCAD to the top window unless anybody has a better suggestion ....

Who is online

Users browsing this forum: No registered users and 41 guests

About DataCAD Forum

The DataCAD Forum is a FREE online community we provide to enhance your experience with DataCAD.

We hope you'll visit often to get answers, share ideas, and interact with other DataCAD users around the world.

DataCAD

Software for Architects Since 1984