Solved

calling methods (which appears to execute ok) -- is not updating display

Posted on 2008-10-06
3
134 Views
Last Modified: 2013-12-17
calling methods (which appears to execute ok) -- is not updating display

Form #1 (which opened Form #2)

public bool SetWebPane(string webURL)
        {
            try
            {
                webBrowserIncompleteDIPs.Navigate(webURL);
                documentPane_IncompleteDIPs.Activate();

                radLabel1.Text = "I should be working OK !";
                return true;
            }
            catch (COMException ex)
            {
                showError(ex);
                return false;
            }
        }

____________________

Form #2

private void radButton1_Click(object sender, EventArgs e)
        {
            FormCentral openForm = new FormCentral();
            openForm.SetWebPane("http://www.123.com");
        }  

problem is that Form #1 does not appear to be updating the screen with visual upates / or processing any of the methods commands such as navigate etc. -- yet in debug I can see the url value being passed across the 2 winforms ok and those lines of code being called ... but nothing on-screen (winform #1) is updating.

what could this? and how fixable?
0
Comment
Question by:amillyard
  • 2
3 Comments
 
LVL 13

Expert Comment

by:SameerJagdale
Comment Utility
try to spawn a thread for updating UI..
0
 

Author Comment

by:amillyard
Comment Utility
SameerJagdale:  apologies -- could you explain a little further, an example to assist my understanding if possible?
0
 
LVL 13

Accepted Solution

by:
SameerJagdale earned 500 total points
Comment Utility
well, I initially thought of it but don't think it will work !
the reason is you are trying to update controls on another form from one form. The best would be pass the object of Form1 to Form2 in contructor and then try calling the methods on this object.
Further, WebBrowser may have issue since, it is an wrapper to a com component..
let me know if i can help you with more...
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now