So, I am kind of beginner in WCF and I've build a windows form chat application that show user logged in once they login but i want to make logout even if the user cross (X) close the form directly. so How can i do that.. Thank You.
Asked
Active
Viewed 343 times
2
-
Use [Window.Closing Event](https://msdn.microsoft.com/en-us/library/system.windows.window.closing) – Orkhan Alikhanov Jun 15 '17 at 07:43
2 Answers
1
Refer to this answer
Basically you process logout on that event handler Window.Closed

Tecno
- 65
- 1
- 7
1
I would make a method Logout and excecute it i the Window.Closed event and also implement it in the Logout button.Clicket .

Nicola Munz
- 73
- 14