Close a form in a usercontrol

Posted on 2015-01-05
Last Modified: 2015-01-05
I have a form I use to login as a different user - if I click cancel it closes the entire application and not just the form
the form is called from a usercontrol
Forms.Login li = new Forms.Login(); 
public void ShowLogin(string title)
            li.title = title;

Open in new window

in the code for the cancel button I am using

Open in new window

like I said - after cancel is selected the entire app closes
what am I not seeing here
Question by:r3nder
  • 2
LVL 44

Accepted Solution

AndyAinscow earned 500 total points
ID: 40531902
Is this what you want?

Author Comment

ID: 40532039
I tried that and it didnt work - then I cleaned the solution and it worked - go figure :D

Author Closing Comment

ID: 40532041
thanks Andy

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about problems I had with the new location API and permissions in Marshmallow
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question