Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / June 2006

Tip: Looking for answers? Try searching our database.

How to wait till webbrowser completes sending a form?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mebeserk@gmail.com - 12 Jun 2006 12:03 GMT
I've got a program that has to submit forms automaticly and go to the
next page.

I know that the following code works for Navigate but it hasn't any
affect on Documents.Forms[0].InvikeMember("Submit");.

=== My code ===
Browser.Navigate("http://www.google.com/");
while (Browser.ReadyState != WebBrowserReadyState.Complete)
 Application.DoEvents();
=== My code ===

Does any know the sollution, I preffer to don't use a variable that's
been set on the event DocumentCompleted.
Marc Gravell - 12 Jun 2006 12:23 GMT
I'm assuming it leaves immediately? (rather than not at all)
Well, one way would be to set a flag in the DocumentCompleted event -
possibly a (volatile) bool or a ManualResetEvent or something similar; just
include a check on this in the loop. I haven't tried hooking up the code
(because it takes a bit of faffing to get forms working in this way; picking
a server etc), but you could also try simply checking the IsBusy property?

Marc
MeBerserk@gmail.com - 24 Jun 2006 22:44 GMT
THnx for you reply.
I tried somethings already by now =P, but I used Navagated event of
WebBrowser,
this way you can check if the form has been sent. And after that you
can still choose if you want to wait till the document is loaded or
interactive or whatever you want.

> I'm assuming it leaves immediately? (rather than not at all)
> Well, one way would be to set a flag in the DocumentCompleted event -
[quoted text clipped - 4 lines]
>
> Marc

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.