?
Solved

Windows.Forms TopMost is lost

Posted on 2013-01-08
1
Medium Priority
?
1,531 Views
Last Modified: 2013-02-25
Hello

I have a Windows.Forms Application "MyMainApp" (C# / .Net 4.0) which runs on Windows 7.

There is a second programm running at the same time, but the "MyMainApp" must always be visible and is started as TopMost.

I have the problem, that sometimes the "MyMainApp" disappears behind the second program “MySecProg”.
I found out that this happens, if another window “PopUpWindow” from a background process pops up as top most (f.e. Printing messages).

If I close the “PopUpWindow”, then "MyMainApp" stays behind the “MySecProg”. With Alt+Tab I can bring the focus to "MyMainApp" again and it comes to the front. It also stays at the front afterwards, what means that it is still TopMost.

What can I do, that "MyMainApp" does not disappear, if another window pops up?

Thanks for your help!!


FYI: This is a Question that was already answered. The accepted solution improofed the situation, but didn't solve it :-).

first solution:
this.Deactivate += new System.EventHandler(this.Form1_Deactivate);
private void Form1_Deactivate(object sender, EventArgs e)
        {
            this.Activate();
        }
0
Comment
Question by:ICSAutomation
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 25

Accepted Solution

by:
SStory earned 1200 total points
ID: 38859715
http://stackoverflow.com/questions/683330/how-to-make-a-window-always-stay-on-top-in-net

Have you tried setting the .owner property as the above article suggests (last paragraph).
You need to make sure the on top app is owned by your other window, then you can keep it on top of your own window. There is no way to make a top most that is always above other windows that another app sets to topmost.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question