Show a message box from a Windows Service

前端 未结 6 879
-上瘾入骨i
-上瘾入骨i 2020-12-06 00:48

Can you display a message box (or any form of notification) from a windows service? Can\'t get it to work. I used:

            global::System.Windows.Forms.M         


        
6条回答
  •  鱼传尺愫
    2020-12-06 00:52

    Allow service to interact with desktop will help you doing this from the Services.msc console.

    BUT, this is a very bad idea. Especially if you forget to remove this messagebox later on. The service will hang since you will have a messagebox which no one can click on.

提交回复
热议问题