Hi, I have a strange behaviour in a timer event that refreshes the contents of a list.
Sometimes it steals the focus from other applications even though my app is "behind" the application the user is currently working on.
I assume this is because of the SetFocus method?
I use this to "reactivate" the control that had focus before the list was refreshed. Otherwise the user have to click back on the control for each refresh and that is annoying.
Before I SetFocus I check if Me.Name = Screen.ActiveForm.Name so this does not happen all the time, but sometimes it still jumps to the front!!?
I have checked and I do not have any other timers in my application that sets focus.
Are there other tests I can run before I do SetFocus to make sure my application is at the front and has user focus??
![[elephant2] [elephant2] [elephant2]](/data/assets/smilies/elephant2.gif)
graabein
Sometimes it steals the focus from other applications even though my app is "behind" the application the user is currently working on.
I assume this is because of the SetFocus method?
I use this to "reactivate" the control that had focus before the list was refreshed. Otherwise the user have to click back on the control for each refresh and that is annoying.
Before I SetFocus I check if Me.Name = Screen.ActiveForm.Name so this does not happen all the time, but sometimes it still jumps to the front!!?
I have checked and I do not have any other timers in my application that sets focus.
Are there other tests I can run before I do SetFocus to make sure my application is at the front and has user focus??
![[elephant2] [elephant2] [elephant2]](/data/assets/smilies/elephant2.gif)
graabein