locked
How do I refresh all pages in a page frame? RRS feed

  • Question

  • A form has a page frame with five pages. According to the docs "Only the active page is refreshed when the Form Refresh method occurs for the form on which the page is located.." How do get the other four pages to refresh?

    Putting a refresh in the Activate code for an individual page doesn't work. This was working and I've apparently borked something. Any thoughts appreciated. Thanks!

     


    Bob Morris
    Thursday, January 12, 2012 12:28 AM

Answers

  • this.Refresh in the page activate always works for me. You can, alternatively, use this code

     

    for each loPage in thisform.myPageframe.Pages FOXOBJECT
    
       loPage.Refresh()
    
    next
    

     


    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog
    • Proposed as answer by Tom BorgmannEditor Thursday, January 12, 2012 6:44 AM
    • Marked as answer by Mike Feng Sunday, January 29, 2012 7:00 AM
    Thursday, January 12, 2012 4:42 AM

All replies

  • this.Refresh in the page activate always works for me. You can, alternatively, use this code

     

    for each loPage in thisform.myPageframe.Pages FOXOBJECT
    
       loPage.Refresh()
    
    next
    

     


    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog
    • Proposed as answer by Tom BorgmannEditor Thursday, January 12, 2012 6:44 AM
    • Marked as answer by Mike Feng Sunday, January 29, 2012 7:00 AM
    Thursday, January 12, 2012 4:42 AM
  • Refreshing all pages at once is not a good idea. It can hinder application performance. What you should do, is put This.Refresh() in the Activate event of each page.
    Craig Berntson
    MCSD, Visual C# MVP
    INETA Community Speaker
    www.craigberntson.com
    Thursday, January 12, 2012 3:55 PM
  • For some reason, this.refresh in the page.activate does nothing and I'm baffled why.

     

    I currently have it kludged with this in form.refresh. This works, but the screen flashes as it updates.

    thisform.pfOrders.ActivePage = 5

    thisform.pfOrders.ActivePage = 4

    thisform.pfOrders.ActivePage = 3 

    thisform.pfOrders.ActivePage = 2

    thisform.pfOrders.ActivePage = 1

     


    Bob Morris
    Thursday, January 12, 2012 5:35 PM