How to start a new form without disabling the previous one

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • linjin
    New Member
    • Sep 2008
    • 2

    How to start a new form without disabling the previous one

    Hello.

    I have a question.

    How can I create a new form, lets say fomr b, by clicking a button on form a, and with the form b open, still can navigate from form a.

    thank you.~

    i'm using .NET for above code
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    You haven't given us much to go on to help you out...
    No mention of language (Java, C#...) or if this is a Windows Forms application or a web app etc.
    So all we can do is take a stab in the dark.

    Let's say... A windows for under C#...

    If all you want to do is keep form 'A' alive and able to be navigated then you have no problems. Making a new form does not disable the old form.
    When form 'A' creates form 'B', 'B' will now have focus. If you want form 'A' to have focus then you can assign it from 'B' if you like. Maybe stick it in the OnLoad() method. Parent.Focus() This will make it look like 'A' created 'B' without loosing control.

    You did say "navigate from form a" - If you are wanting to use form 'a' as a navigational tool for form 'b', that's a much bigger deal.

    Comment

    • zubair1
      New Member
      • Sep 2008
      • 79

      #3
      Hi,

      If you're using VB.net

      you can easily add a new form to your current project, from the menu

      and then all you will have to do is call your form for you button.

      Code:
      form2.show
      You just have to add that code to your button and it will show the new form without hiding the current one.

      Comment

      • linjin
        New Member
        • Sep 2008
        • 2

        #4
        I'm using C# .

        I got the answer now.
        thanks for all your help.

        acturally, the problem is between show() and showdialog().

        If i'm using showdialog(), then the parent form will lose control.
        but if i'm using show(). both forms will work fine.

        :D
        thanks

        Comment

        • tlhintoq
          Recognized Expert Specialist
          • Mar 2008
          • 3532

          #5
          Originally posted by linjin
          I'm using C# .

          I got the answer now.
          thanks for all your help.

          acturally, the problem is between show() and showdialog().

          If i'm using showdialog(), then the parent form will lose control.
          but if i'm using show(). both forms will work fine.

          :D
          thanks

          For future references and searches the term is modal or non-modal.

          Comment

          Working...