Link to home
Start Free TrialLog in
Avatar of DelphiCurious
DelphiCurious

asked on

opening form within another form and keeping open

i have form1 which opens on top of form 2(show,not show dialog aka modal), i want form2 to stay open even if the user clicks on form1, how this is done???

I also want to set the focus to textbox1 on form2 once its opened
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

I'm not sure, but I think you worded the question incorrectly.

>> i have form1 which opens on top of form 2(show,not show dialog aka modal), i want form2 to stay open even if the user clicks on form1, how this is done???

Should be...?

>> i have form2 which opens on top of form1 (show,not show dialog aka modal), i want form2 to stay open even if the user clicks on form1, how this is done???

If I am correct, then these two settings will make that happen:

    Set the TopMost property of Form2 to True.
    Set the TabIndex of TextBox1 to 0 (zero).

Regards,

Idle_Mind
Avatar of DotNetLover_Baan
DotNetLover_Baan

>>"i want form2 to stay open even if the user clicks on form1"<<
Do you mean to keep Form2 front most ? even if you click on Form1 ? If yes, you are talking about ShowDialog().
If not, just use Form2.Show, which is going to keep Form2 open until you close it.

Still I am not sure what you are trying to achieve. Please explain
-Baan
Avatar of DelphiCurious

ASKER

Idle_Mind you are correct, i worded it wrong,u solved the problem i had with the forms and but setting the focus of the textbox aint working. The textbox is on a tabpage, i tried to set the tabcontrol's index to 0 and the textbox within it to 0  but it still wont work
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial