1. I've attached one possible way.
2. The focus returns to the Table control at the end of SelectionChanged event.
The solution is to use a timer which will set the focus:
Code:
Sub Globals
'Declare the global variables here.
End Sub
Sub App_Start
Form1.Show
AddTimer("Timer1")
Timer1.Interval = 5 'ms
End Sub
Sub Timer1_Tick
Timer1.Enabled = false
TextBox1.Focus
End Sub
Sub Table1_SelectionChanged (ColName, Row)
Timer1.Enabled = True
End Sub