topmost

focus lost after making another app's window topmost

I'm making another app's window topmost to ensure that a click in my app brings the other's dialog into views. The problem I'm having is that I don't get focus back to my app after the call. If the other app has more windows one of them ends up with focus, and otherwise no window (looking at the taskbar only) gets focus. Where should I s...

How do you make a non-modal topmost dialog that is only topmost in regards to the parent form in WinForms?

Thinking about this for an About dialog but I'm sure it's applicable in other places (say a find box) Sorry if this is a dupe, but I couldn't find this or how to articulate the last part about it only being on top of the parent. How do you make a form that is always on top of the parent form, but is non-modal, but doesn't cover up oth...

Problem with Z-Order involving TopMost and Invoke

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 th...

Can I set ShowDialog() to not be topmost?

Is there a way I can set a ShowDialog() to not be topmost? I've looked at all the related SO questions, and none quite matched my situation. What I do is open a new WinForm from a datagridview button column. This new form pulls information from a few SQLite tables and allows the user to add information to the row the button was clicked....

How to get the handle of the topmost form in a WinForm app?

I have a WinForm app that has other child forms (not mdi). If the user presses "Esc" the topmost form should be closed even if it doesn't have the focus. I can use a keyboard hook to globally catch the Escape but I also need the handle of the form to be closed. I guess there is a way to do that using Win32 API, but is there a solution...

How to keep a window on top of all other windows in my application only?

I would like to display a status window in my C# Windows Forms application that informs the user when the application is waiting to acquire a lock. This is an application-defined thing, however, the window should be visible and always remain on top of all other windows of my application, even when the user clicks on another window (like ...

C# - How to deal with 2 "TopMost" Forms?

I have a parent form that is set to be TopMost and then I have another form that opens when a button is clicked. This child form is also set to be TopMost. The first issue I had was that when I opened the child form, the application would basically freeze because you couldn't access anything. I decided that instead of using ShowDialog...

How to stop WPF TopMost flag on parent window from being inherited by the child

I have a WPF window that has TopMost=true . When I call another Window from this window and specify the topmost window as the parent the owned window also displays as TopMost. I would like to find a way to stop that from happening so that my parent can still own the child yet the child does not have TopMost=True. I know I can just no...

Toggling TopMost in VB.NET

I have a form that has to be on top for a period of time, and then can be set behind other windows normally. Is there anything in addition to setting Me.TopMost to True or False that needs to be done? I ask because it doesn't seem to be working. ...

TOPMOST window in full-screen

Hi, I'm playing with a JFrame in Java. I want it to be the topmost window i.e. always on top. The setAlwaysOnTop() works fine, but as soon as I start a movie or a game-window in a full-screen mode then it fails to stay on top. I played around with JNI and handles. My C code for JNI is using SetWindowPos() and this seems to be working ...

Start a process TopMost.

I have a C# .Net 2.0 app which implements a FullscreenMode like this: targetForm.WindowState = FormWindowState.Maximized; targetForm.FormBorderStyle = FormBorderStyle.None; targetForm.TopMost = true; WinApi.SetWinFullScreen(targetForm.Handle); // let me know if you need the code of this methode If the user is in FullscreenMode and tri...

(WinForms) ListView shows tooltips behind its own form when form is topmost

I have a Form with just a ListView in it. The ListView is set to show tooltips for subitems (in Details view). The tool tip shows fine if the form is not top most. When I set the Form's TopMost to true, the tool tip appears "behind" the window. Is there any other property/combination of properties that need to be set in order to get the...

WPF-Window Topmost for own application only?

The Splashscreen/Loading-Window in my WPF application is set to Topmost="True". Now this windows in on top of all other windows even when you switch to another application (because loading will take some time). I don't want this kind of behavior. If I set Topmost="False" the window in not topmost at all. But If you switch back to my app...

How to make a WPF window be on top of all other windows of my app (not system wide)?

I want my window to be on top of all other windows in my application only. If I set the TopMost property of a window, it becomes on top of all windows of all applications and I don't want that. ...

Setting an XAML Window always on top (but no TopMost property)

I am developing an application based on OptiTrack SDK (from NaturalPoint). I need to run the application window as "Always on Top". The window is designed in XAML and is controled in the class "CameraView" but it does not seem to include a "TopMost" property or equivalent. Attached are the code of "CameraView.xaml.cs" and the code of "Ca...

Really annoying bug with TopMost property in Windows Forms

Hi, I have this Windows Forms application where it sits in the notification area. Clicking on the icon brings it up front, clicking it again (or clicking on the app X icon) sends it back. This is the type of app that having the window always on top is important when it's displayed by clicking the icon (it's optional though). Right-clic...

Make help-file not TopMost

I created process and launched help-file Process help = new Process(); help.StartInfo.FileName = "C:\MyProjects\comp\help_eng.hlp"; help.Start(); However, this help file is displaying topform;I need to open a folder for example, but it is always under this process.Could you tell me, how to make process "ordinary"? - it shouldn't be to...

How to keep my topmost window on top?

I will first explain why I need it, because I anticipate that the first response will be "Why do you need it?". I want to detect when the mouse cursor is on an edge of the screen and I don't want to use hooks. Hence, I created one pixel wide TOPMOST invisible window. I am using C++ on Win XP, so when the window is created (CreateWindow...

Determine if windows form is obstructed

Is it possible in .Net (or thru pinvoke) to determine if a windows form is obstructed from view (i.e. other windows have been moved over top of it, so it cannot be seen)? What I am doing is checking if the form is minimized, then flashing the window on the taskbar if it is. However the problem is if it is NOT minimized, but just moved t...

Windows Mobile: Draw graphic permanently on the screen

Is it possible to draw a graphic (e.g. a rectangle) on a specific area of the screen, in order to be visible all the time even if a full screen application like a game is running? I tried to accomplish this by making a window top most, but like I expected, it got hidden when another program was doing the same thing. Even if I restarted ...