linking Forms

G

Guest

hi,
ill describe my program first, so you will get the idea..
its like this,
Main form.. with some buttons, one of the buttons is "Change Form Setting".
when you click that button, it opens new form window "Setting Form" Window.
now, i have two questions:

1. after opening the "setting form" window, how to make the "Main form"
window unreachable !?
(so u cant click on it while opening the other windows,
like when u get a message box, u cant press on the form, and you will get a
"beep")

2. Simply.. i just put a text box, when u enter a text, then u press Submit,
the "Main Form" text will be changed (name in title bar) how to make that !?
i tried
MainForm.ActiveForm.Text == NewNameArrayList;
but it changed the "Settings Form" text !! not the Main Form !!
any ideas will be appreciated !
thanks in advance
 
C

Chris Dunaway

hi,
ill describe my program first, so you will get the idea..
its like this,
Main form.. with some buttons, one of the buttons is "Change Form Setting".
when you click that button, it opens new form window "Setting Form" Window.
now, i have two questions:

1. after opening the "setting form" window, how to make the "Main form"
window unreachable !?
(so u cant click on it while opening the other windows,
like when u get a message box, u cant press on the form, and you will get a
"beep")

2. Simply.. i just put a text box, when u enter a text, then u press Submit,
the "Main Form" text will be changed (name in title bar) how to make that !?
i tried
MainForm.ActiveForm.Text == NewNameArrayList;
but it changed the "Settings Form" text !! not the Main Form !!
any ideas will be appreciated !
thanks in advance

Show your second form using ShowDialog instead of Show, that will make
the calling form inaccessible until you close the called form.

To return the value of a textbox on the called form, from inside the
main form you could try:

SecondForm form = new SecondForm();
form.ShowDialog();

this.Text = form.TextBox1.Text;

form.Dispose();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top