In my application there is a list view that when a selection is changed I would like to set the focus on a specific control. I am using the ItemSelectionChanged
event to capture the change. And yes I know that the event fires twice and that is why if validate IsSelected
After the event is fired, the focus returns to the list view. Very frustrating. I tried Do Events and a list view refresh before setting the focus and that did not work.
Side note: the function SetPayment updates several controls with information. There are no events attached to any of those controls.
Private Sub lsvPayments_ItemSelectionChanged( _
ByVal sender As Object, _
ByVal e As System.Windows.Forms.ListViewItemSelectionChangedEventArgs) _
If e.IsSelected Then
If Len(txtRefundAmt.Text) > 0 Then