This code works :
private void showForm2ToolStripMenuItem_Click(object sender,
EventArgs e)
{
Form2 frm = new Form2();
frm.MdiParent = this;
frm.Show();
toolStripTextBox1.Focus();//This is a text box in the menu
strip control
}
On 6 July 2010 21:48, Anthony <[email protected]> wrote:
> I have mdi form application. When the application loads..it opens the first
> mdi child and automatically sets it as the focus. How do i set the focus
> to the main form instead of the child mdi that has just opened.
>
>
>
>
>
> Sub Form_Load()
>
> ....
>
> Open MDI Child...
>
> Me.Focus()..doesn’t work
>
> End Sub
>
>
>
>
>
>
>
> Is your website being IntelliXperienced?
> regards
> Anthony (*12QWERNB*)
>
> Is your website being IntelliXperienced?
>
>
>
>