By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,783 Members | 1,347 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,783 IT Pros & Developers. It's quick & easy.

blocked form

P: n/a
Hi All,

I have a Form1 that includes a menu.
When I open a Form2, using the menu, the use of Form1 must be blocked. As
can I do that?
Thank you
May 8 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
before showing the Form2, disable Form1 using

Form1.Enabled = true;

May 8 '06 #2

P: n/a
I think you mean Form1.Enabled = false ...
Another alternative would be to use ShowDialog() instead of Show() which
will cause the first form to be inaccessible until the second form is
closed.

Cheers,

Greg Young
"jimmy" <ac**********@gmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
before showing the Form2, disable Form1 using

Form1.Enabled = true;

May 8 '06 #3

P: n/a
Stefano wrote:
Hi All,

I have a Form1 that includes a menu.
When I open a Form2, using the menu, the use of Form1 must be blocked. As
can I do that?
Thank you


Form2 MyForm = new Form2();
MyForm.ShowDialog();

HTH
JB
May 8 '06 #4

P: n/a
Hi,

Use a modal dialog, this will invalidate the parent form. Also note that
this has the consequence that the call will not return until the form is
closed.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Stefano" <st****@libero.it> wrote in message
news:ez**************@TK2MSFTNGP04.phx.gbl...
Hi All,

I have a Form1 that includes a menu.
When I open a Form2, using the menu, the use of Form1 must be blocked. As
can I do that?
Thank you

May 10 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.