Solved

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

Posted on 2008-10-06
3
135 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
ID: 22658058
try to spawn a thread for updating UI..
0
 

Author Comment

by:amillyard
ID: 22674288
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
ID: 22677703
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
display data in text field from data base for updating 6 50
Get list of word ducuments in a folder 10 35
Visual Studio editor? 1 38
Turn on intranet settings 1 37
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…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

911 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

21 Experts available now in Live!

Get 1:1 Help Now