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 9079341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:48:52+00:00 2026-06-16T19:48:52+00:00

I have a form that is set to always ontop. I force this every

  • 0

I have a form that is set to always ontop. I force this every 500 ms via a timer shown below in code.
The timer is being started from a child thread.

The form has to raise an error sometimes but this is not modal and the users ends having to click it twice – once to make it modal and once to acknowledge it (if they do it fast enough)

The user can also bring up a combobox that is in a panel in the main form but when selecting this, the dropdown becomes clear again, as a result of the timer making the form modal(the same effect as if the user just clicked away from the combobox).

How can i fix the Messagebox that it is modal?
How can i fix the combobox that it continues to list the items within it without clearing
thanks
damo

timer to make form always on top

// Restore the form.
this.Visible = true;
this.TopMost = true;
this.WindowState = FormWindowState.Maximized;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable;
this.Show();

messagebox

MessageBox.Show(this,"hello world", "myApplication");
  • 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-06-16T19:48:53+00:00Added an answer on June 16, 2026 at 7:48 pm

    Just disable the timer before and reenable after showing the messagebox:

    timer1.Enabled = false;
    MessageBox.Show(this,"hello world", "myApplication");
    timer1.Enabled = true;
    

    This of course can be in a method so you won’t have to duplicate code:

    public void ShowMessage(string title, string message)
    {
       timer1.Enabled = false;
       MessageBox.Show(this,message, title);
       timer1.Enabled = true;
    }
    

    Since MessageBox.Show is a blocking command, timer will only be reEnabled after the MessageBox is closed

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

Sidebar

Related Questions

Okay, so I have this form that is set to preload a DB record
I have a form on my homepage that is set up to submit via
I have a couple of ComboBoxes on a Win Form that I always set
I have this code where it makes the form always on top, transparent and
I have a parent form that is set to be TopMost and then I
I have a form that contains dataGridView, whose coloumn are set to dgrv1.Width =dgrv1.Columns.GetColumnsWidth(DataGridViewElementStates.Visible)+20;
I have a model form that contains a DecimalField() with max_digits set to 5.
As input I have a set of triangles that form concave mesh with holes.
I have a method set up that uses jquery form for a file upload
I have a Profile form that inherits from sfGuardRegisterForm I have these fields: $this->useFields(

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.