About Windows forms

Posted by Srikanth.srknt under C# on 9/11/2009 | Views : 897 | Status : [Member] | Replies : 4
I have 2 window Forms in my application Form1 and Form2. In Form1 i have a button in that button click Event, I am creating object for Form2 and i called object.show(); now both the Forms displayed and Focus on Form2 currently.

Now my question is when until unless closing the Form2 Window i never select Form1 or i can not perform any operations other Form2. how is it possible




Responses

Posted by: Tripati.patro on: 2/18/2011 [Member] Starter | Points: 25

Up
0
Down
Use ShowDialog method to open one form from other. It won't allow you to back to parent form until the child form is closed.

Try to use
object.ShowDialog(this); //rather then object.show()


B.Tripati Patro
Oracle Certified Associate

Srikanth.srknt, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 2/18/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi,

Try creating an MDI form and you can have more flexibility

Thanks
Karthik
www.f5Debug.net

Srikanth.srknt, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 9/16/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
your Question is not Clear , can you please Repeat it.

Thank you for posting at DotnetFunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Srikanth.srknt, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bubbly on: 10/21/2009 [Member] Bronze

Up
0
Down
Hello,

You can make form1 enabled true so that no operations will be performed on it.

++
Thanks & Regards,
Deepika

Srikanth.srknt, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response