Set Focus to a ToolStripTextBox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Upon the load of my form, I would like the cursor to be in a textbox within a
toolstrip. Does anyone know if this is possibe? I've tried putting the
following code in both the Form_Activate and Form_Load events:

ToolStripTextBox1.Focus()
ToolStripTextBox1.Select()
ToolStripTextBox1.SelactAll()

None of these cause an error, but none of them work. Any ideas appreciated.
 
Most probably you need to activate and focus toolstrip itself before you
can focus contained controls.

Just a guess though
 
Back
Top