How to refresh a form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Diyas
    New Member
    • Oct 2007
    • 2

    #1

    How to refresh a form

    Hi,

    Am using C# language.
    I got two forms Form1 and Form2. By clicking the ADD button from the Form1, i ll be moved to Form2, which allows me to append some details in this form. After appending the data when i click SAVE button in Form2, my Form1 should be refreshed. Can anyone tell me how do i refresh the First form from the Secondform?

    tanx
    Diya.S
  • Firecore
    New Member
    • Jul 2007
    • 114

    #2
    Originally posted by Diyas
    Hi,

    Am using C# language.
    No idea how to do wat uve asked. But it might help putting your answer in the right forum.

    This is the C/C++ forum.

    I think you have to use the .NET forum for C#.

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      Moving this to the .NET forum.

      Comment

      • bhappy
        New Member
        • Jul 2007
        • 139

        #4
        HI,

        Create Instance for Form1() in Form2().

        In Form2() Before calling Form1() Add This Code.

        obj=new Form1()
        obj.Form1_Load( sender,e)
        obj.show()

        I hope it will Help's U.

        Comment

        • Shashi Sadasivan
          Recognized Expert Top Contributor
          • Aug 2007
          • 1435

          #5
          hi


          in Form1 where you call form2.

          [CODE=cpp] Form2 frm2 = new Form2();
          frm2.ShowDialog ();
          this.refreshDet ails();
          [/CODE]

          You should create a method refreshDetails where all the code goes ni for refresing those parts you want to.
          Showdialog will open form2 and keep it focused until form2 has been closed.Once closed the refreshDetails will be called.

          cheers

          Comment

          Working...