hi,
i created 2o different windows forms for ma project,
but now m in big truble.
like iframe in web application...is ter any method in windows C# forms.
or any other method to solve this problem. ...and pls post details of how can i setup my project to exe file. with user name and pass word..protection..
pls ..pls.....
Loading

Nilanka DharmadasaRank #1,875 · 794 reputationPosted Nov 15, 2009, 10:41 PM EST
Let me explian you about it with an example.
Let's say you have a form called Form1. That's your main form.
You have a menustrip in that main form and you have added a menustrip item to the menustrip. When you click on the menustrip item, it creates another form inside the main from.
To do this, you should write your code as follows.
In your main form's constructor you should add this red line.
public Form1()
{
InitializeComponent();
this.IsMdiContainer = true;
}
Then you should wrtie following code in the click event of menu strip item.
private void toolStripMenuItem1_Click(object sender, EventArgs e)
{
Form childform = new Form();
childform.MdiParent = this;//here, 'this' is Form1
childform.Show();
}
That's all you have to do.
Check it and let me know.
If you find this useful, please do not forget to mark this answer as accepted.
Nilanka DharmadasaRank #1,875 · 794 reputationPosted Nov 15, 2009, 9:06 PM EST
You can use MDI froms concept to show one form inside another form, if it is what you want.
To create a setup project, you can add a setup project to your solution.
Sreekanth199 reputationPosted Nov 15, 2009, 9:58 PM EST
using menustrip in MDi form and by selecting one menustrip item corresponding will show in d MDI form's specific area.
Sreekanth199 reputationPosted Nov 15, 2009, 11:27 PM EST
little more help...pls
i created main form with menustrip.. and i hav another form ,loginmasterfrm
by selecting login in menustrip i want open this from. in the MDI-main- form....
Nilanka DharmadasaRank #1,875 · 794 reputationPosted Nov 16, 2009, 12:03 AM EST
You can use the code I have given. Only change you have to do is, changing the names.
If you still feel you need help, paste your code here.