Service starting a process wont show GUI C#

前端 未结 4 708
自闭症患者
自闭症患者 2020-11-28 11:58

Hey, I am trying to get a service to start my program but it isn\'t showing the GUI. The process starts but nothing is shown. I have tried enabling \'Allow service to intera

4条回答
  •  暖寄归人
    2020-11-28 12:37

    Services run in a different logon session and have a different window station from the user. That means that all GUI activity is segregated from the user's programs, not that the service can't display a GUI. Actually, this design makes it much easier to temporarily block access to the user's programs.

    You'll need to call SwitchDesktop.

提交回复
热议问题