CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 1999
    Posts
    3

    Refresh Form With New Data

    I have a form that prints infomration on label captions from intormation stored in the registry. I have a second options form that changes the information in the registry. How can I change the information on the original form with out bringing up a second instance of that form?


  2. #2
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: Refresh Form With New Data

    you can have a Public member function in your InfoDisplay form like ReLoad or UpdateNewValues
    which will read the data from the registry.

    You can call this function from your dataentry form at the click of a "Update Registry" btn or form close. For this to happen, you must pass a pointer of the InfoDisplay form to the DataEntry form.

    The new way doing this is thru "implements". You can design a interface for these two forms to talk to each other i.e they will be calling the funtions of each other thru this interface.

    Another method is to Raise an Event in the DataEntry form and handle that event in the InfoDisplay form, After the data entry done and registry updated by the DataEntry form, it will raise this event and in that event handle the InfoDisplay form will read the new data from Registry and updates itself.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured