locked
Refresh C# windows application form RRS feed

  • Pergunta

  • I have to refresh the main form during closing the sub form.

    How can i do.

    regards

    vishnu

     

    terça-feira, 9 de janeiro de 2007 14:15

Respostas

  • Hi,

    What are you meaning to refresh? What about using Refresh() method of the form or calling the Form_load event, when closing sub form?

    terça-feira, 9 de janeiro de 2007 15:29
  • you could do:

    this.Refresh(); to redraw the contents of the current form

    terça-feira, 9 de janeiro de 2007 19:08

Todas as Respostas

  • Hi,

    What are you meaning to refresh? What about using Refresh() method of the form or calling the Form_load event, when closing sub form?

    terça-feira, 9 de janeiro de 2007 15:29
  • you could do:

    this.Refresh(); to redraw the contents of the current form

    terça-feira, 9 de janeiro de 2007 19:08
  •  

    Form1 frm=new Form1();

    frm.Refresh();

     

    May be this is helpfull for You 

    quarta-feira, 29 de outubro de 2008 06:09
  • i want to use a function under button click and 

    i want to refresh the present form when the button is clicked

    can someone help me with the code?

    quarta-feira, 26 de setembro de 2012 15:04
  • this.Refresh() command is not applicable when we use it in a thread.

    which command is suitable to refresh the Win App form to redraw the contents?

    please help!!


    SaiNave


    • Editado IB1515 quinta-feira, 31 de agosto de 2017 09:03
    quinta-feira, 31 de agosto de 2017 09:03
  • Something like this: 

    private void Form_Load( object sender, EventArgs e )
    {
       // Remove all code from here ... 
    }
    
    private void refreshForm()
    {
       // ... and place it here 
    }
    
    THEN 
    
    private void Form_Load( object sender, EventArgs e )
    {
       refreshForm(); 
    }
    
    private void Button1_Click( object sender, EventArgs e )
    {
       refreshForm(); 
    }
    
    You may need to add some extra code into the refreshForm method to "clean up" thing that may have been added to the Form previously (e.g. dynamically loaded controls). 


    Regards, Phill W.

    quinta-feira, 31 de agosto de 2017 10:16