locked
from one form to another RRS feed

  • Question

  • Hi, i make windows mobile app 6.1 using c#

    I make application with four forms. When  I click button to redirect me to another Form I use this code 

    Form3 nov = new Form3();

                nov.ShowDialog();           

                this.Close();

    Form3 is open but the application create another process in task manager. This is happen for all open Form. How can I fix that ?

    Thanks

    Wednesday, June 22, 2011 9:32 AM

Answers

  • First of all, it does not create another process, just another window and that is what standard task manager (or should we call it Windows Manager) shows.

    Next, your this.Close() does not execute because .ShowDialog() shows modal form and it blocks till that dialog is closed.

    You can use .Show() instead or you can .Hide() the parent form and then do .ShowDialog() based on your intentions.

     


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Proposed as answer by WmDev Thursday, June 23, 2011 8:11 AM
    • Marked as answer by Oliver.Maximus Thursday, June 23, 2011 7:13 PM
    Wednesday, June 22, 2011 5:14 PM