C# Windows application prevents Windows from shutting down / logging off

前端 未结 4 1992
后悔当初
后悔当初 2021-01-06 09:07

I have written a C# Windows Forms application, not a service (it is only used when the user is logged in and has a graphical user interface) that has a background thread run

4条回答
  •  青春惊慌失措
    2021-01-06 09:56

    You call that thread a "background thread" but does it have IsBackground = true; ?
    The system will only stop a thread that does.

提交回复
热议问题