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
I also want to set the focus to textbox1 on form2 once its opened
>>"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
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>> 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