jcohedman Member Licensed User Longtime User Aug 27, 2017 #1 In the sample app, ckvs.SetAutoRefresh is in AppStart. May I change it position to another sub, to use other users? Thank You.
In the sample app, ckvs.SetAutoRefresh is in AppStart. May I change it position to another sub, to use other users? Thank You.
Erel B4X founder Staff member Licensed User Longtime User Aug 28, 2017 #2 You can call it anywhere you like and multiple times. However as you can see from the code you need to include all users in each call: B4X: Public Sub SetAutoRefresh(users As List, IntervalMinutes As Double) AutoRefreshUsers = users autoRefreshTimer.Interval = IntervalMinutes * DateTime.TicksPerMinute autoRefreshTimer.Enabled = True AutoRefresh_Tick End Sub Upvote 0
You can call it anywhere you like and multiple times. However as you can see from the code you need to include all users in each call: B4X: Public Sub SetAutoRefresh(users As List, IntervalMinutes As Double) AutoRefreshUsers = users autoRefreshTimer.Interval = IntervalMinutes * DateTime.TicksPerMinute autoRefreshTimer.Enabled = True AutoRefresh_Tick End Sub