disposing

C# How do I prevent a TcpClient object from disposing in a different thread i've created with the new keyword?

So I'm trying to make a client for my server in C#, that accepts messages as commands so I can control the client remotely. I've had problem after problem with my masterServer.Connect taking FOREVER to load, and almost every time I close my application I have to wait 10 seconds for it to completely stop. I've tried EVERYTHING to stop thi...

Can I control cleaning items when user leaves the request?

Hi all. I have a page that allows uploading of multiple files, the files are uploaded constantly, i.e. there are many FileUpload controls and a submit button near each of them and it uploads immediately. I want, that once the user leaves the page and goes to another page without saving the main container (e.g. the 'item' = a product/no...

Disposing JFrame by clicking from an inner JPanel.

Hello, I'm trying to dispose my JFrame by clicking a button, located on a JPanel that is placed on the JFrame that I want to close. I tried to make a static method on the JFrame class, but ofcourse my IDE told me that wasn't going to happen. Anyone thinking of a solution? Thanks! ...

Do I have to manually remove all event handlers for each instance??

Consider this class: Class Item : Inherits ItemBase Public Sub New AddHandler MyEvent, AddressOf MyEventHandler End Sub Private Sub MyEventHandler() End Sub Private Sub MySecondEventHandler() Handles MyBase.MyEvent End Sub End Class Do I have to manually remove the handlers on destruction of thi...