C#: Load/unload forms
in c# i have two forms
frm1 and frm2
wht is the actual way of loading frm2 and unloading frm1,
against an event in frm1
i m using this code for loading frm2
Form frm=new frm2
and for unloading frm1 i m doing
because there is no unload method
but whn i stop application by closing frm2,frm1 still run at back end
wht i m doing wrong
how is it posible thorough mdi
Use frm1.Close instead of frm1.Hide.
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
use frm1.close() to unload a form
instead of usin frm2.show(), you can also use frm2.showDialog().
the difference is showDialog() method will open the form as a modal form where the parent(or the Owner) form remain in the background, but not accessible.
See the MSDN for showDialog() sample.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL