Hi!
Try this code.
private void menuItem2_Click(object sender, System.EventArgs e)
{
{
foreach(Form f in this.Mdichildren)
{
if(f.Name==Convert.Tostring(ur MdichildFromName)
{
if(f!=this.MdiActivechild)
{
f.Close();
}
{
if(f.Name==Convert.Tostring(ur MdichildFromName)
{
if(f!=this.MdiActivechild)
{
f.Close();
}
}
any doubt mail to me.
by,
T.Suresh.
mona gamal <[EMAIL PROTECTED]> wrote:
hi allI face problem on checking that if ihave a form already opend by using menuitemI want to stop user from opening this form while it is already opnedcode written on c#Main form codeprivate
void menuItem2_Click(object sender, System.EventArgs e){
Form2 f=
new Form2();f.MdiParent=
this;f.Show();
}
how can i change thios code ;
note:
i made 2 solutions but it dosenot work
first: make flag (true on open(show),false on closed)
second: make menuitem disabled when form already opend & enabled on closed.
but these solutions dosenot work
i would be gratefull if anyone help me
thank you
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Yahoo! India Matrimony: Find your partner now.
YAHOO! GROUPS LINKS
- Visit your group "Microsofts_C_Sharp" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
