Sub Activity_Pause (UserClosed As Boolean)
If UserClosed Then
scanTimer.Enabled = False
commTimer.Enabled = False
CallSub(BT_Service, "Disconnect")
StopService(BT_Service)
Activity.Finish ' if I use "ExitApplication" problems gone.
End If
End Sub
' I also call the same user exit from a button
Sub btnExit_Click
Activity_Pause(True)
End Sub