Hello!
How can I use various forms in a project?
Lets say I have a login Window.. Now how can I call the menu Window from it when I click on a button?
Thanks in advance!
Printable View
Hello!
How can I use various forms in a project?
Lets say I have a login Window.. Now how can I call the menu Window from it when I click on a button?
Thanks in advance!
I might be wrong but is this what you mean ?:rolleyes:
Code:Form2 frm2 =new Form2() ;
frm2.Show ();
Shouldn't I declare form 2 before? :confused: I don't know how to use it on C# in VB we would only make a new form, add code and call it with "Me.Hide Form2.Show" is it the same here?
Yes , the same . Create your form , then call it this way :
Code:Form2 frm2 =new Form2() ;
frm2.Show ();
Thanks, Pirate. I will give it a try. :)
I'd like to know how to control a control in another form. say i wanna change text property of a button which is in form1 from form2
Thanks, Pirate.. That worked just fine! :D
Session, if you are trying to do it from the same form you called the form2, then it could be something like:
I am guessing since I don't have VS .Net here...Code:Form2 frm2 = new Form2();
frm2.Show();
frm2.button1.Text = "My New Text";