Amrit Sharma
Amrit Sharma

Reputation: 1916

Loading another form on top

Is it possible to load another form on top of one form. User should not be able to interact with first form. If user minimize the first form the stacked form should also minimized. Is this doable?

For example, User loads Form A, click some controls and Form B appears. now until Form B is closed, user should not be able to do anything in form A.

Upvotes: 0

Views: 65

Answers (3)

Banusundar Arumugam
Banusundar Arumugam

Reputation: 251

Keep the base form or the first form as MDI Parent and all other forms as it's child...so you will have full contorl over the child forms like moving, closing, minimizing. It will fullfill your requirements.

Upvotes: 0

Sriram Sakthivel
Sriram Sakthivel

Reputation: 73502

For example, User loads Form A, click some controls and Form B appears. now until Form B is closed, user should not be able to do anything in form A.

This sounds like you need to show FormB using ShowDialog with FormA as parent.

FormB formb = new FormB();
formb.ShowDialog(this);//Where this is FormA

Upvotes: 1

Elegiac
Elegiac

Reputation: 361

have you tried using MDI?

csharp.net-informations.com/gui/cs-mdi-form.htm

Upvotes: 0

Related Questions