How do I use multiple forms in c#. most importantly how do i get a second form to pop up and return information to the other form?
(btw im trying to recrate an inputbox like thing)
Printable View
How do I use multiple forms in c#. most importantly how do i get a second form to pop up and return information to the other form?
(btw im trying to recrate an inputbox like thing)
create a new form class.
yourform formtest = new yourform()
formtest.Show()
or .ShowDialog() for modal
give the form a property you can you can check in the other form for whatever value you need to return.
OK i created my second form. I now have a main form and an input form. When the input form comes to be shown i want it to not be able to be minimized or for the user to anyway switch back to the main form. I think i want this to be modal(if i use that term correctly) is there a way to do this?
never mind i figured it out. all ihave to do is this
Code:Form2 frm2 = new Form2();
frm2.ShowDialog(this);
good boy.
;)