Hi everyone,
When developing .net programs you sometimes run into problems with freezing, this happens when the application loaded too much. Therefore, you have to run on a separate thread. Here is a little example in VB.NET.
Public Class Settings
Private worker As System.Threading.Thread
Private Sub Settings_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
‘SaveSettings() ‘This is regular way, which will froze your app.
worker = New Threading.Thread(New Threading.ThreadStart(AddressOf Me.SaveSettings))
worker.Name = “Save Settings”
worker.Start()
End Sub
Private Sub SaveSettings()
‘Do your saving here, which run on a different thread
End Sub
End Class
Hopes this will help solve some of your freezing problems.
Happy Programming!