How to close the form using user control

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • krishnaneeraja
    New Member
    • Mar 2008
    • 21

    How to close the form using user control

    Hi,
    Iam developing c#.net windows application.In that iam using one form(form1) and using two user defined control forms in that form1.If i want to close form1 but it closes the entire application.I want to close only particular control not entire application.plz help me.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Were you trying to use Application.Exi t() or something?

    In the code for the user control, have you tried:
    me.Parent.Close ()
    or
    this.Parent.Clo se() ?

    Comment

    Working...