Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 744525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:59:18+00:00 2026-05-14T08:59:18+00:00

When form A is modal and it displays a second modal form B, and

  • 0

When form A is modal and it displays a second modal form B, and the modal result for B is set and B then closes, A is also closed.

How can this be prevented?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T08:59:18+00:00Added an answer on May 14, 2026 at 8:59 am

    This is not true, there has to be some other problem in your code. Setting ModalResult will affect only the currently modal form. Try this very simple example:

    • Create a new form

    • Drop a button onto it

    • In the button OnClick event handler add this code:

      procedure TForm1.Button1Click(Sender: TObject);
      begin
        with TForm1.Create(Self) do begin
          if ShowModal = mrCancel then
            Self.Color := RGB(Random(256), Random(256), Random(256));
        end;
      end;
      

    You will observe that each button press creates a new modal form, and you can repeat this as often as you wish. Closing a form will set its ModalResult to mrCancel and re-enable the parent form. To exit the application you will need to close all forms, one by one, in the opposite order of creation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a modal window with a login/sign-up form. I would like to prevent
I'm trying to implement master detail in a rails form with fields_for. I have
I have complex form that I want to make more user friendly. It consists
I am doing form submission and validation using jQuery and from server side I
So i have a page that is gonna have multiple modal popups. Each one
I have a weird problem with my i18n doctrine schema and i.a. the admin
In a web page I have a button when clicked it calls a JavaScript
Ok, so i have a few <div1> elements with static content inside of them.
So I have a model and one of the columns contains a country. However
I am playing with a sample WPF application that is tiered in a Model-View-Presenter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.