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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:54:42+00:00 2026-06-07T10:54:42+00:00

I have been writing a little application where Form1 opens, checks that a config

  • 0

I have been writing a little application where Form1 opens, checks that a config file is present and correct, and then hides in the Task Bar until an API call is received.

When this happens I would like a new Form to open in the bottom right corner and show various details, but am having some issues. When I use ShowDialog to open the form the form doesn’t always honor the TopMost to try and get the form to appear on top of all other windows, however if I use Show instead, this honors the TopMost, but the form style is messed up as can be seen below.

The standard form looks like:

Caller Number: XXXXXXXX
Caller Name:   XXXXXXXX
               XXXXXXXX

Code Examples

Form2 form2 = new Form2();
form2.TopMost = true;
form2.TopLevel = true;
form2.ShowDialog();

Above: Doesn’t always open on-top of everything

Form2 form2 = new Form2();
form2.TopMost = true;
form2.TopLevel = true;
form2.Show();

My Current code is:

private void checkCalls(object source, System.Timers.ElapsedEventArgs e)
{
    var client = new RestClient("http://apiurl.com");
    client.Authenticator = new HttpBasicAuthenticator(api_username, api_password);

    var request = new RestRequest("/", Method.GET);

    // async with deserialization
    var asyncHandle = client.ExecuteAsync<Call>(request, response =>
    {
        if (response.Data == null)
        {
            if (incoming_call == true && notify_type == "Pop-Up")
            {
                if (caller.InvokeRequired)
                {
                    caller.Invoke(new EventHandler(delegate {
                        Console.WriteLine("Hidden via Invoke");
                        caller.Hide();
                    }));
                }
                else
                {
                    Console.WriteLine("Hidden without Invoke");
                    caller.Hide();
                }
            }
            incoming_call = false;
        }
        else if(incoming_call == false)
        {
            incoming_call = true;
            if (notify_type == "Pop-Up")
            {
                //Console.WriteLine("Openning Window");
                if (caller.InvokeRequired)
                {
                    caller.Invoke(new EventHandler(delegate
                    {
                        Console.WriteLine("Opening Window via Invoke");
                        caller.Show();
                        caller.TopMost = true;
                        caller.TopLevel = true;
                    }));
                }
                else
                {
                    Console.WriteLine("Opening Window");
                    caller.Show();
                    caller.TopMost = true;
                    caller.TopLevel = true;
                }
            }
        }
    });
}

And some Logs:

Opening Window
Hidden without Invoke
Opening Window
Hidden without Invoke

Above, opens like (hard to see, but the Text Boxes should be greyed out as Disabled and Readonly, and there is black text next to each Text Field which is now invisible, but has a white background):

screenshot http://img546.imageshack.us/img546/5517/screenshot20120708at222.png

Thanks in advance!

  • 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-07T10:54:45+00:00Added an answer on June 7, 2026 at 10:54 am

    Change the type of form to FixedDialog. If problem persists, try changing your caller.Hide() to caller.SetOpacity(0), and your caller.Show() to caller.SetOpacity(1)

    Force a refresh of the form whenever you show the form.

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

Sidebar

Related Questions

I have been thinking of maybe writing a little tool that logs into SO
I've been writing a little application that will let people upload & download files
I have been writing a SOAP client application in C++ on Ubuntu using OpenSSL
I have been writing DLL on C++, that will be use in C#. DLL
I have been writing an application using ASP.Net MVC4, where the majority of the
I have been given the painful task of writing a C# application to sync
I'm writing a little desktop application that plugs into Google Calendar (or other iCal-powered
We have a relatively new database project that we have been writing views and
I am writing a little program in C# that scans a folder and opens
I have been writing my scripts for FF but was hoping with little work

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.