Getting error: Close the form before calling showDialog
                            
                         
                        
                     
                 
                
                    Hi
I am getting error, "Form that is already displayed modal cannot be displayed as a modal dialog box. Close the form before calling showDialog" when I am showing form as showdialog. could you please suggest how do i check form is already open and if opened then how can I close it.
Thanks...