Reputation: 7053
i built a chat. it has a client winform and a server winform.
what i am need to do is to notify, the server when the client closed his application i.e. ClientA left the server.
I am looking for a way to fire an event that will be activated as soon as the client closed the winform.. so as soon as the winform closes, the event should be triggered, and i should put a code inside that will inform the server that the client has left.
The question is whether there is such an event?
Upvotes: 0
Views: 82
Reputation: 2005
Use Form.FormClosed event or override method Form.OnFormClosed
Upvotes: 1
Reputation: 6453
You can use the Form.FormClosing
event. More details here.
The FormClosing event occurs as the form is being closed.
Upvotes: 2