Re: Refreshing a Windows Form

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi,

What you really need to do is call a method in the parent form that refresh
the info displayed in the controls,

refreshing the form is only repaint it, each control repaint itself using
the data they contains.

If the info that they need to display changed, you will have to update them,
then they will repaint itself alone :)

Create a method ( you probably have one already ) that will assign the info
read from the webservice to the control, you have to call this method when
the second form closes.


cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation



"Robert Clark" <rclark> wrote in message
news:%23$DEKxnlFHA.3936@xxxxxxxxxxxxxxxxxxxxxxx
> This a pocket pc/smartphone questions mainly, but i thought i'd ask the
> question in the C# newsgroup. I have a form which i use to display
> information from a web service. From this form i open another Form. On
> this form i update the webservice which in turn updates the information
> displayed on the previous form. When i close this form, I wish to refresh
> the previous Form to show the new modified data.
>
> How can i do this?
>
> Is there a way to refresh the form every time it gains focus ?
>


.



Relevant Pages

  • Re: [REPOST] java.awt.Image problem
    ... >>refresh only when a change has taken place, ... Also iconizing it and refocusing it will repaint. ... Do you mean to say that the display looks ... > and it was unnecessary since my ticker repaints the whole area. ...
    (comp.lang.java.programmer)
  • Re: repainting modeless dialog
    ... "Repaint" is a poor description of my problem. ... There is a static text control that is used to display the message. ... first time my display function is called, the window gets created. ...
    (microsoft.public.vc.language)
  • RE: combo boxes(why cant this stuff be simple?)
    ... it works perfectly now with the refresh ... All it needs to do is display the names, ... control to a list box and go that route. ... rethink your database design. ...
    (microsoft.public.access.forms)
  • Re: A question regarding use of the Test Container to check ActiveX controls
    ... i did replace InvalidateControl; with a call to Refresh(); and ... that seems to force the control to repaint itself in the Test Container ...
    (microsoft.public.vc.mfc)
  • Re: Program cant display a jpeg on a Dialog with default CDialog::OnPaint()
    ... To force any window to update itself, you can call Invalidate, followed by ... When you want to repaint the CStatic, ... control itself and that should force the repaint and the new image will ... display. ...
    (microsoft.public.vc.mfc)