C#: Load/unload forms


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: C#: Load/unload forms

  1. #1
    Join Date
    Jun 2005
    Posts
    12

    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
    frm.show();

    and for unloading frm1 i m doing
    frm1.hide
    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

  2. #2
    Join Date
    Nov 2004
    Location
    Oslo
    Posts
    73
    frm1.close()
    oes

  3. #3
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Use frm1.Close instead of frm1.Hide.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  4. #4
    Join Date
    Aug 2005
    Posts
    15
    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.

  5. #5
    Join Date
    Aug 2005
    Posts
    46
    hahahahhehe

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center