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 / C++ / MFC
  4. how to let a gui program run in background?

how to let a gui program run in background?

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelptutorial
5 Posts 4 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.
  • I Offline
    I Offline
    ikohl
    wrote on last edited by
    #1

    hello, i want you help, how can i let a windows gui program run in background, don't tell me use ShowWindow(SW_HIDE), i have tried that one, it's not a good method. There's such a function, SetForegroundWindow(), can i use SetBackgourndWindow... And several monthes ago, when i telnet to another pc, and run Notepad.exe in that computer, i found Notepad.exe is really in that computer's background, i want that effect also, can anybody help me. Thanks very much.

    B M D 3 Replies Last reply
    0
    • I ikohl

      hello, i want you help, how can i let a windows gui program run in background, don't tell me use ShowWindow(SW_HIDE), i have tried that one, it's not a good method. There's such a function, SetForegroundWindow(), can i use SetBackgourndWindow... And several monthes ago, when i telnet to another pc, and run Notepad.exe in that computer, i found Notepad.exe is really in that computer's background, i want that effect also, can anybody help me. Thanks very much.

      B Offline
      B Offline
      bankai123
      wrote on last edited by
      #2

      Have a look at the BackgroundWorker class. That should be what you need.

      I 1 Reply Last reply
      0
      • B bankai123

        Have a look at the BackgroundWorker class. That should be what you need.

        I Offline
        I Offline
        ikohl
        wrote on last edited by
        #3

        I hope a standard win32 api or such functions, not such a component. But thanks for your help.

        1 Reply Last reply
        0
        • I ikohl

          hello, i want you help, how can i let a windows gui program run in background, don't tell me use ShowWindow(SW_HIDE), i have tried that one, it's not a good method. There's such a function, SetForegroundWindow(), can i use SetBackgourndWindow... And several monthes ago, when i telnet to another pc, and run Notepad.exe in that computer, i found Notepad.exe is really in that computer's background, i want that effect also, can anybody help me. Thanks very much.

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          You could launch a GUI app from a windows service application using CreateProcess(). I suppose the telnet session did that with notepad. Edit: Also you could use ShowWindow(SW_HIDE) :-D

          1 Reply Last reply
          0
          • I ikohl

            hello, i want you help, how can i let a windows gui program run in background, don't tell me use ShowWindow(SW_HIDE), i have tried that one, it's not a good method. There's such a function, SetForegroundWindow(), can i use SetBackgourndWindow... And several monthes ago, when i telnet to another pc, and run Notepad.exe in that computer, i found Notepad.exe is really in that computer's background, i want that effect also, can anybody help me. Thanks very much.

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            ikohl wrote:

            ...how can i let a windows gui program run in background...

            What exactly do you mean by this? Unlike Unix, Windows does not have the capability to run processes in the background. They are either running or they are not. A window's Z-order has no bearing on whether its process is running or not.


            "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

            "Judge not by the eye but by the heart." - Native American Proverb

            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