Topmost windows
-
There's an always on top window in my app, but I have an annoying problem with it. The window is just a normal window with TopMost set to true. Now this works fine, but I want the window to dissappear if another app gets focus. I tried pussing
topwindow.Visible = true;
in the Activate event andtopwindow.Visible = false;
in the Deactivate event, but these events get called even when another window in my app gets actiavted, so whenever I click on the topmost window, it dissappears because the main window gets deactivated. Is there a way to prevent the topmost window from getting focus at all? (But still use it as normal, just no focus. By normal I mean still have it receive mouse clicks.) Or some way to determine what window is getting focus in the Deactivate event? Or some other way to fix this? -
There's an always on top window in my app, but I have an annoying problem with it. The window is just a normal window with TopMost set to true. Now this works fine, but I want the window to dissappear if another app gets focus. I tried pussing
topwindow.Visible = true;
in the Activate event andtopwindow.Visible = false;
in the Deactivate event, but these events get called even when another window in my app gets actiavted, so whenever I click on the topmost window, it dissappears because the main window gets deactivated. Is there a way to prevent the topmost window from getting focus at all? (But still use it as normal, just no focus. By normal I mean still have it receive mouse clicks.) Or some way to determine what window is getting focus in the Deactivate event? Or some other way to fix this?Nice to meet you here. I hope I will do help you . First Create a class with a namespace test namespace test { public class GlobalVars { public static bool blVisible; public GlobalVars() {} } } In topwindows ,set a Timer Component which watch the test.GlobalVars.blVisi ble , When it is true , Ignore it , when it is false , set Visible to false In the other Window , Set the blVisible to control the Global Variables; I hope it will help you
-
Nice to meet you here. I hope I will do help you . First Create a class with a namespace test namespace test { public class GlobalVars { public static bool blVisible; public GlobalVars() {} } } In topwindows ,set a Timer Component which watch the test.GlobalVars.blVisi ble , When it is true , Ignore it , when it is false , set Visible to false In the other Window , Set the blVisible to control the Global Variables; I hope it will help you