I have done some searches on this and have found Herfrieds suggestions on opening the DLL in a different appDomain. I have not done this before and am curious on the consequences. Below is the code I am currently using, but it locks the dll.
<STAThread()> _
Public Shared Sub Main()
Try
Dim t As New Thread(AddressO f StartApplicatio n)
t.Name = "DLLThread"
t.Start()
If CheckforUpdates () = True Then
' Prompt user if he wants to apply the updates
If MessageBox.Show ("Updates are available for this program. Do you wish to install the updates?", "Updates Available", MessageBoxButto ns.YesNo, MessageBoxIcon. Information) = DialogResult.Ye s Then
t.Abort()
t = Nothing
UpdateApplicati on()
StartApplicatio n()
End If
End If
Catch ex As Exception
MessageBox.Show (ex.ToString, "Exception Thrown")
Finally
End Try
End Sub
Private Shared Sub StartApplicatio n()
Dim frm As New TestingForm.For m1
Application.Run (frm)
End Sub
--
--Eric Cathell, MCSA
<STAThread()> _
Public Shared Sub Main()
Try
Dim t As New Thread(AddressO f StartApplicatio n)
t.Name = "DLLThread"
t.Start()
If CheckforUpdates () = True Then
' Prompt user if he wants to apply the updates
If MessageBox.Show ("Updates are available for this program. Do you wish to install the updates?", "Updates Available", MessageBoxButto ns.YesNo, MessageBoxIcon. Information) = DialogResult.Ye s Then
t.Abort()
t = Nothing
UpdateApplicati on()
StartApplicatio n()
End If
End If
Catch ex As Exception
MessageBox.Show (ex.ToString, "Exception Thrown")
Finally
End Try
End Sub
Private Shared Sub StartApplicatio n()
Dim frm As New TestingForm.For m1
Application.Run (frm)
End Sub
--
--Eric Cathell, MCSA
Comment