Hi ,
I think your code will work but, when I wrote it there is no function or property =this.MdiActivechild
i don't know if error on my .net version (.Ne t2003 )
did you have .Net 2005?
thanks for your help
suresh suresh <[EMAIL PROTECTED]> wrote:
suresh suresh <[EMAIL PROTECTED]> wrote:
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();
}
}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! Music Unlimited - Access over 1 million songs. Try it free.
SPONSORED LINKS
| Basic programming language | C programming language | Computer programming languages |
| Programming languages | C programming language | Software programming language |
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.
