Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. "Always on top" attribute...

"Always on top" attribute...

Scheduled Pinned Locked Moved The Lounge
announcementquestion
29 Posts 17 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D dandy72

    Decades ago MS added an "always on top" attribute you could give to a window your app creates so you could have a window that was always floating on top of everything else. If you dragged another window over that area, you could see the window being dragged slide "underneath" it rather than on top of it as you would otherwise ordinarily expect. These days you rarely see apps using this attribute, but I don't believe there's anything in more recent versions of Windows to prevent you from using it. For the past couple of years (and it's been this long before I decided to ask, just now) I've noticed a few apps that should never have this attribute, or at least have never presented any option to make it top-most, seemingly *randomly* get this attribute out of nowhere, and it stays that way until you close the app and restart it. I have an old version of a news reader (as in Usenet) that does this every once in a while, and I've also seen remote desktop sessions do it also. Once the window somehow decides it's going to always be on top, I can't bring other windows in front. None of the apps I've seen exhibit this behavior have any option to turn this on or off, and I can't imagine any sort of criteria where code in an app might turn on the always-on-top attribute. Am I speaking total non-sense, or has anyone else ever seen this? [Edit] I've done a quick google search, and while there are apps that apparently people use to make any app top-most, I absolutely, positively, have never downloaded such apps...and as far as I know there's no magic, secret key combination built into Windows to do that either.

    D Offline
    D Offline
    decaffeinatedMonkey
    wrote on last edited by
    #20

    Windows PowerToys has a feature to toggle any app to become top-most. It would be cool for that feature to notify you which apps are already top-most, and flip that switch off if they try to force being top-most.

    D M 2 Replies Last reply
    0
    • G Gary Wheeler

      I have a feeling this is not a bug in the topmost window handling in the application, but in Windows' management of which application it decides is the foreground app. There have been numerous changes to the foreground decision logic during Windows 7, 10, and 11. Some of the changes were hailed by Microsoft that they gave the user more control, and disallowed applications from the annoying tendency of grabbing the foreground. I also have the feeling some of these changes have been 'internal' in order to handle task bar notification balloons and such. There are also problems with legacy API's (for example, some message box options) that assume foreground behaviors that are no longer certain. TL;DR - It's complicated, from some perspectives it's broke, and they ain't gonna fix it.

      Software Zen: delete this;

      D Offline
      D Offline
      dandy72
      wrote on last edited by
      #21

      This is the closest thing to a possible explanation as I've seen throughout this entire thread; seems like some people have missed my point, or intentionally ignored it.

      Gary Wheeler wrote:

      TL;DR - It's complicated, from some perspectives it's broke, and they ain't gonna fix it.

      No feature is ever so simple that MS can't find a way to complicate it to the point where it becomes buggy.

      1 Reply Last reply
      0
      • D decaffeinatedMonkey

        Windows PowerToys has a feature to toggle any app to become top-most. It would be cool for that feature to notify you which apps are already top-most, and flip that switch off if they try to force being top-most.

        D Offline
        D Offline
        dandy72
        wrote on last edited by
        #22

        That's an intriguing idea. If it was such a big hassle, I just might throw something together to periodically pool all windows and look which has the attribute, and log when the topmost flag gets assigned to a window - that might help narrow down what actually triggers it. But, it's still so rare I don't think I'd invest the time in doing that. Every time I've seen this happen, closing/restarting the app is all that's needed to get the window behaving normally again, and I can certainly live with that.

        1 Reply Last reply
        0
        • D decaffeinatedMonkey

          Windows PowerToys has a feature to toggle any app to become top-most. It would be cool for that feature to notify you which apps are already top-most, and flip that switch off if they try to force being top-most.

          M Offline
          M Offline
          maze3
          wrote on last edited by
          #23

          POWER TOOLS 💪 POWER, FLEX came to say same. And Media Player Classic has 3 options, for all the uhm "home movies" I watch. 😶 always on top on top while playing 👍 off

          1 Reply Last reply
          0
          • D dandy72

            Decades ago MS added an "always on top" attribute you could give to a window your app creates so you could have a window that was always floating on top of everything else. If you dragged another window over that area, you could see the window being dragged slide "underneath" it rather than on top of it as you would otherwise ordinarily expect. These days you rarely see apps using this attribute, but I don't believe there's anything in more recent versions of Windows to prevent you from using it. For the past couple of years (and it's been this long before I decided to ask, just now) I've noticed a few apps that should never have this attribute, or at least have never presented any option to make it top-most, seemingly *randomly* get this attribute out of nowhere, and it stays that way until you close the app and restart it. I have an old version of a news reader (as in Usenet) that does this every once in a while, and I've also seen remote desktop sessions do it also. Once the window somehow decides it's going to always be on top, I can't bring other windows in front. None of the apps I've seen exhibit this behavior have any option to turn this on or off, and I can't imagine any sort of criteria where code in an app might turn on the always-on-top attribute. Am I speaking total non-sense, or has anyone else ever seen this? [Edit] I've done a quick google search, and while there are apps that apparently people use to make any app top-most, I absolutely, positively, have never downloaded such apps...and as far as I know there's no magic, secret key combination built into Windows to do that either.

            B Offline
            B Offline
            Bruce Patin
            wrote on last edited by
            #24

            No, I have not seen windows forcibly moved underneath an "always on top" window, but I have often waited for some function in an app to be done with a spinning GIF indicating that it is working on the task, then several minutes later, maybe after I have given up and aborted the operation, find that there was a required dialog to continue that process underneath the main window that I was waiting on. That's one case where such dialogs should be "always on top", so I don't miss them.

            D 1 Reply Last reply
            0
            • D dandy72

              Decades ago MS added an "always on top" attribute you could give to a window your app creates so you could have a window that was always floating on top of everything else. If you dragged another window over that area, you could see the window being dragged slide "underneath" it rather than on top of it as you would otherwise ordinarily expect. These days you rarely see apps using this attribute, but I don't believe there's anything in more recent versions of Windows to prevent you from using it. For the past couple of years (and it's been this long before I decided to ask, just now) I've noticed a few apps that should never have this attribute, or at least have never presented any option to make it top-most, seemingly *randomly* get this attribute out of nowhere, and it stays that way until you close the app and restart it. I have an old version of a news reader (as in Usenet) that does this every once in a while, and I've also seen remote desktop sessions do it also. Once the window somehow decides it's going to always be on top, I can't bring other windows in front. None of the apps I've seen exhibit this behavior have any option to turn this on or off, and I can't imagine any sort of criteria where code in an app might turn on the always-on-top attribute. Am I speaking total non-sense, or has anyone else ever seen this? [Edit] I've done a quick google search, and while there are apps that apparently people use to make any app top-most, I absolutely, positively, have never downloaded such apps...and as far as I know there's no magic, secret key combination built into Windows to do that either.

              M Offline
              M Offline
              Matthew Barnett
              wrote on last edited by
              #25

              I've recently started using "EPG Centre", an app that reads the EPG that's broadcast by Freeview. Its progress bar is always on top. It takes several minutes to read the EPG, so I start it and then let it run in the background, but the progress bar stays on top, for no reason.

              D 1 Reply Last reply
              0
              • B Bruce Patin

                No, I have not seen windows forcibly moved underneath an "always on top" window, but I have often waited for some function in an app to be done with a spinning GIF indicating that it is working on the task, then several minutes later, maybe after I have given up and aborted the operation, find that there was a required dialog to continue that process underneath the main window that I was waiting on. That's one case where such dialogs should be "always on top", so I don't miss them.

                D Offline
                D Offline
                dandy72
                wrote on last edited by
                #26

                MessageBox.Show( "blah" );

                ...with no parent param specified will often result in that sort of thing. If you've switched to another app before the popup appears, giving focus back to the app will NOT bring the popup back from behind whatever it's hiding. Set your message box parents, people!!

                1 Reply Last reply
                0
                • M Matthew Barnett

                  I've recently started using "EPG Centre", an app that reads the EPG that's broadcast by Freeview. Its progress bar is always on top. It takes several minutes to read the EPG, so I start it and then let it run in the background, but the progress bar stays on top, for no reason.

                  D Offline
                  D Offline
                  dandy72
                  wrote on last edited by
                  #27

                  Sounds like in this case, it was intentionally designed this way. Clearly these guys think they're so important the progress bar must *always* remain visible...

                  1 Reply Last reply
                  0
                  • D dandy72

                    Decades ago MS added an "always on top" attribute you could give to a window your app creates so you could have a window that was always floating on top of everything else. If you dragged another window over that area, you could see the window being dragged slide "underneath" it rather than on top of it as you would otherwise ordinarily expect. These days you rarely see apps using this attribute, but I don't believe there's anything in more recent versions of Windows to prevent you from using it. For the past couple of years (and it's been this long before I decided to ask, just now) I've noticed a few apps that should never have this attribute, or at least have never presented any option to make it top-most, seemingly *randomly* get this attribute out of nowhere, and it stays that way until you close the app and restart it. I have an old version of a news reader (as in Usenet) that does this every once in a while, and I've also seen remote desktop sessions do it also. Once the window somehow decides it's going to always be on top, I can't bring other windows in front. None of the apps I've seen exhibit this behavior have any option to turn this on or off, and I can't imagine any sort of criteria where code in an app might turn on the always-on-top attribute. Am I speaking total non-sense, or has anyone else ever seen this? [Edit] I've done a quick google search, and while there are apps that apparently people use to make any app top-most, I absolutely, positively, have never downloaded such apps...and as far as I know there's no magic, secret key combination built into Windows to do that either.

                    E Offline
                    E Offline
                    englebart
                    wrote on last edited by
                    #28

                    I found this on another site that seems to line up with what you are seeing, especially if you use the WinLogo + D, or task bar "Show the desktop" to toggle all windows away, then back. There are some possible work arounds mentioned like Ctrl+Alt+Esc might help reset it. [https://superuser.com/questions/269415/show-desktop-sometimes-sets-a-window-to-always-on-top\](https://superuser.com/questions/269415/show-desktop-sometimes-sets-a-window-to-always-on-top)

                    1 Reply Last reply
                    0
                    • D dandy72

                      Decades ago MS added an "always on top" attribute you could give to a window your app creates so you could have a window that was always floating on top of everything else. If you dragged another window over that area, you could see the window being dragged slide "underneath" it rather than on top of it as you would otherwise ordinarily expect. These days you rarely see apps using this attribute, but I don't believe there's anything in more recent versions of Windows to prevent you from using it. For the past couple of years (and it's been this long before I decided to ask, just now) I've noticed a few apps that should never have this attribute, or at least have never presented any option to make it top-most, seemingly *randomly* get this attribute out of nowhere, and it stays that way until you close the app and restart it. I have an old version of a news reader (as in Usenet) that does this every once in a while, and I've also seen remote desktop sessions do it also. Once the window somehow decides it's going to always be on top, I can't bring other windows in front. None of the apps I've seen exhibit this behavior have any option to turn this on or off, and I can't imagine any sort of criteria where code in an app might turn on the always-on-top attribute. Am I speaking total non-sense, or has anyone else ever seen this? [Edit] I've done a quick google search, and while there are apps that apparently people use to make any app top-most, I absolutely, positively, have never downloaded such apps...and as far as I know there's no magic, secret key combination built into Windows to do that either.

                      S Offline
                      S Offline
                      Shmoken99
                      wrote on last edited by
                      #29

                      Managed code or unmanaged code? Could a memory leak or uninitialized pointer flip the always on top setting for a long running app? Even managed code can be leaky, but usually you just run out of memory.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups