How to receive event when network is connected and also when user logs in

前端 未结 6 1427
再見小時候
再見小時候 2021-02-06 02:32

I have a service that runs and I\'d like to receive notification when:

a) the network is connected.

b) when a user logs in to the machine.

How can I do

6条回答
  •  隐瞒了意图╮
    2021-02-06 03:27

    You could write a WinLogin Notification package. However, I am not sure if it is possible to do in C#. (I have no reason to believe it isn't, but I have only ever done it in C++ and unmanaged code.)

    Here is a CodeProject link

    I don't know how to listen for when the network connects.

提交回复
热议问题