.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Forum >> Windows Application >> Post New QuestionBookmark and Share Subscribe to Forum

how can i checked if form is already open in c#

Posted By: Naim Khan     Posted Date: August 25, 2010    Points:2   Category :Windows Application
hello friends,

i want to know that if i have already open form then same form will not open again... is it possible in Windows Application using C#...
and i m using MDI form and other then is Child form.. i m given you code and i dont knowhow can i solve my problem...]

//code for open form
Parties_Entry parties = new Parties_Entry();
parties.MdiParent = Main_Form.mainObj;
Reply me ASAP...

Author: Nikhil Kumar             
Posted Date: August 25, 2010     Points: 5   

try this.
frm_emp emp = new frm_emp();
emp.MdiParent = this;

inform me. if not.

Be helpful and enjoy life because it comes only onces. Give all the happiness to yours and remember it doesn't comes by money ...
Author: Akhil Raj       [Moderator]      
Posted Date: September 05, 2010     Points: 5   
Author: Santosh             
Posted Date: October 06, 2010     Points: 5   

just follow the below link ..

hope u will get ur solution..



Author: krishana singh             
Posted Date: December 07, 2010     Points: 5   

Form f = this.ActiveMdiChild;
if (f != null)

Author: krishana singh             
Posted Date: December 07, 2010     Points: 5   

//Form f = this.ActiveMdiChild;
//if (f != null)
// f.Close();
//frmAttendance f1 = new frmAttendance();
//f1.MdiParent = this;
//f1.WindowState = FormWindowState.Maximized;

Author: Narayanan             
Posted Date: April 11, 2012     Points: 20   

try this

 string proc = Process.GetCurrentProcess().ProcessName;
Process[] processes = Process.GetProcessesByName(proc);
if (processes.Length > 1)
MessageBox.Show("Already,Application opened", "Application shutdown notification");

Regards, Lakshmi Naraayanan.S

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend