embedded form focus problem

P

prabuinet

hi,

I added a form as a control on another form. After adding i want the
embedded form to have focus. I tried all combinations but its not
working..

Do any one know how to do this.


-------------------------------------------
i embedded the form like this
-------------------------------------------

Form2 f = new Form2
f.TopLevel = false;
f.Parent = this;
f.Show();
f.BringToFront();
 
N

Nicholas Paldino [.NET/C# MVP]

You really shouldn't be embedding the form as a control on another
control. If anything, I would create a custom control which has the
controls on the form and then host it in the other control, or place it on a
form.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top