C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » Windows »

To check whether the window is already opened or not


Posted Date: 02 Nov 2009      Posted By: Dhanya       Member Level: Silver     Points: 1   Responses: 3



Hello all,

In my project I'm using Menustrip item to open small child windows.I want to check whether a particular window is opened or not while clicking on this menustrip item.Also if it is already opened,I want to transfer the focus to the already opened window.How can I do that.Anybody having an idea please share it with me.Thanking you
Dhanya.





Responses

Author: Neetu    02 Nov 2009Member Level: DiamondRating: 3 out of 53 out of 53 out of 5     Points: 3

Check the attachement dear.

Dont forget to rate this.
regards
Neetu



Messageifformopen.zip
Author: Danasegarane.A    02 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Normally you will open a window(form) like
Dim frm as new Frm
frm.show()

What do you need to check is that
1.Check the form is Active or not
2.If Active show the form else instance a new form

as


Private frm as new Frm 'Move this to a module
If not frm is nothing Then
frm.show()
Else
frm= new Frm
frm.show()
End if


Thanks and Regards,
Danasegarane Arunachalam



Author: Anuraj    02 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Hopes you are doing it with MDI, try enumerating child windows, check for a this specific one, if exits, call the Activate or Set the ActiveChild property of MDI.

Thanks
Anuraj
THIS POSTING IS PROVIDED "AS IS" WITH NO WARRANTIES, AND CONFERS NO RIGHTS.
BEWARE OF BUGS IN THE ABOVE CODE; I HAVE ONLY PROVED IT CORRECT, NOT TRIED IT.
dotnetthoghts



Post Reply
You must Sign In to post a response.
Next : Crystal reports
Previous : Is there any way to draw a chart in vb.net?
Return to Discussion Forum
Post New Message
Category: Windows

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use