(Borland) Show()/ShowModal() issue

Hello!

First of all, thanks for your interest in dealing with the issue. I searched on many websites and consulted quite a few books, maybe I just don't find the answer, because I don't know exactly what I'm looking for.

Well, here's the problem:

Using the Borland C++ Builder, I want to develop a GUI for an existing form1.
A few more forms can be opened by clicking on Items of a TMainMenu. In those other forms the user can insert certain settings (TEdits), which should be transferred to a TMemo in the original form1, when clicked OK.

At the moment, I realized this through the function ShowModal()->form2 and if(ModalResult == mrOk){ ... }. If possible, however, I want form 2 not to be closed, when "OK" is clicked, but only the values to be transferred.

Using the Show() Function, apparently I don't have a ModalResult and if I try to implement it as "event" of clicking the ButtonOK in form2, then I cannot write into TMemo of form1.

So ... is there any way to transfer values from form2 to form1 by clicking an OK Button in form 2, without the window of form2 to be closed?

What can I do?

Thanks again, for reading. I'm looking forward to hearing your ideas.
Including the Form1 header in Form2 will give you full (public) access to the other form.
Borland-related topics should go to the Windows programming section, by the way.
Last edited on
Hey Athar!

Yes, I wasn't sure about the right forum, so I thought 'beginner' might fit well. Thanks for the advice. I cannot move the topic to the Windows programming section, can I?

I'll try including the header of form1, thanks a lot!
Last edited on
Ha!! It works.
Wow - that was easy. If you knew, what I tried before.

Thank you so much. It helped a lot!
Topic archived. No new replies allowed.