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. Form; always on top.

Form; always on top.

Scheduled Pinned Locked Moved C#
questiongame-dev
4 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.
  • R Offline
    R Offline
    RomanD
    wrote on last edited by
    #1

    How can I make sure my form stay on top of everything. I set the TopMostLevel to true, and it works when I work in windows. Then, I load a game and my form is hidden. Does the game take over the priority or what, and how do I change that? Thanks

    H 1 Reply Last reply
    0
    • R RomanD

      How can I make sure my form stay on top of everything. I set the TopMostLevel to true, and it works when I work in windows. Then, I load a game and my form is hidden. Does the game take over the priority or what, and how do I change that? Thanks

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Games write directly to the screen buffer, not through GDI or GDI+ like Windows does. A system modal dialog would only appear atop a windowed-game, and good luck trying to find any decent ones these days.

      Microsoft MVP, Visual C# My Articles

      R 1 Reply Last reply
      0
      • H Heath Stewart

        Games write directly to the screen buffer, not through GDI or GDI+ like Windows does. A system modal dialog would only appear atop a windowed-game, and good luck trying to find any decent ones these days.

        Microsoft MVP, Visual C# My Articles

        R Offline
        R Offline
        RomanD
        wrote on last edited by
        #3

        For me to write screen buffer, would I have to use DirectX or something of that sorts? Thanks in advance.

        H 1 Reply Last reply
        0
        • R RomanD

          For me to write screen buffer, would I have to use DirectX or something of that sorts? Thanks in advance.

          H Offline
          H Offline
          Heath Stewart
          wrote on last edited by
          #4

          You can, or you can P/Invoke the massive amount of APIs required to communicate with the display HAL, which doing in managed code (except, perhaps, Managed C++) would truly be a nightmare. And just implementing DirectX won't necessary fix the problem: the game may not share its hold on the display device (or any other devices it's using). An exclusive lock may be used. Games like the older Everquest versions (according to my friend) did have such an exclusive lock and if you tried to circumvent the lock the game would crash and eventually your account would be locked out.

          Microsoft MVP, Visual C# My Articles

          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