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. General Programming
  3. C#
  4. Permanently set window to bottom?

Permanently set window to bottom?

Scheduled Pinned Locked Moved C#
data-structuresquestion
3 Posts 2 Posters 0 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.
  • M Offline
    M Offline
    Muntyness
    wrote on last edited by
    #1

    Is there any way to permanently set a window to the bottom of the stack? I know you can send it to the back using: void setbottom(ref Window window) { IntPtr hWnd = new WindowInteropHelper(window).Handle; SetWindowPos(hWnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); } However that method needs to be called every time something else goes to the back. So is there any way make a window permanently set to the back? - Munty

    P 1 Reply Last reply
    0
    • M Muntyness

      Is there any way to permanently set a window to the bottom of the stack? I know you can send it to the back using: void setbottom(ref Window window) { IntPtr hWnd = new WindowInteropHelper(window).Handle; SetWindowPos(hWnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); } However that method needs to be called every time something else goes to the back. So is there any way make a window permanently set to the back? - Munty

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      I seriously doubt that you could. What would happen if you had two applications that tried to do this? Why would you want to do this?

      Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world." Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that." Deja View - the feeling that you've seen this post before.

      M 1 Reply Last reply
      0
      • P Pete OHanlon

        I seriously doubt that you could. What would happen if you had two applications that tried to do this? Why would you want to do this?

        Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world." Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that." Deja View - the feeling that you've seen this post before.

        M Offline
        M Offline
        Muntyness
        wrote on last edited by
        #3

        It's an alternate desktop. (Most normal windows functions are gone, and some specific functions are included) As for what happens when two programs do this, I'd assume that the first program to do it would have priority. After some digging around on my own, in microsofts MSDN website, there's apparently a AlwaysOnBottom setting in Object, but it seems to be for only VB. I was kind of hopping there was something similar for C#. (As far as I can tell it acts the opposite of the AlwaysOnTop setting(which in itself is basically what things like TaskManager use. Apparently.))

        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