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

  • SEARCH
  • Home
  • 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 166511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:06:38+00:00 2026-05-11T12:06:38+00:00

I am showing Dialogs with Form.ShowDialog(). Forms are set to TopMost. Some image processing

  • 0

I am showing Dialogs with Form.ShowDialog(). Forms are set to TopMost. Some image processing calculations are performed asynchronly in the background. Their results are rendered in the main form by Invoke. So far so good. Strange thing is that every now and then the modal dialog is moved behind the main form. I guess that happens when the messages that build up the dialog are somehow ‘disturbed’ by Invoke.

Any ideas how to solve this problem?

  • 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. 2026-05-11T12:06:39+00:00Added an answer on May 11, 2026 at 12:06 pm

    As a general rule, avoid TopMost unless you absolutely must not. If you absolutely must not, never have more than one TopMost form at a time. (After all, there can’t be three TopMost forms— somebody’s got to lose).

    First, verify that you’re correctly setting the owner when you call Form.ShowDialog(). This will make the new form more likely to appear in an appropriate location and all-around improve behavior of the application. Second, verify that you only have one TopMost window at any time. A combined failure to do these things could most definitely cause your problem. E.g.:

    // MainForm.cs -- Don't do this this.TopMost = true; childForm.TopMost = true; childForm.ShowDialog(/*no parent spec'd*/); 

    Now what happens? Both the main form and the child form are topmost, so one of them’s got to lose. MainForm was active when it created childForm as topmost, but childForm doesn’t have a parent. Maybe Windows decided to make the desktop its parent. This could result in the main form staying on the of the newly opened child form.

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

Sidebar

Ask A Question

Stats

  • Questions 103k
  • Answers 103k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer As Apocalisp wrote, you could do something like: import java.util.Random;… May 11, 2026 at 8:27 pm
  • Editorial Team
    Editorial Team added an answer I don't think there is a way. You could: Make… May 11, 2026 at 8:27 pm
  • Editorial Team
    Editorial Team added an answer If you find a feature compelling, use it. But when… May 11, 2026 at 8:27 pm

Related Questions

I have a script that forces a download and I make a call to
I am starting using YUI 's Container control in my application to display messagebox
We are working with some new Cutting Tools that can have it's hardware parameters
I am setting up an alert with a text field in it so players

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.