Click here to Skip to main content
13,595,773 members
Rate this:
Please Sign up or sign in to vote.
I have a VB Windows Form application that I am creating in Visual Studio 2012 which consist of a Web Browser window and a Timer (Stop watch)

When you start the Application the Browser is set to open up a web page that contains a Form where a person would enter in a log number and select the submit button.
It would then bring them to a page with the log details.

What I would like to happen is when the user selects the Look up (submit) Button in the browser the stop watch (timer) starts counting.
When the person does another look up the Counter is zeroed and starts over again.

Is there a simple way of doing this and could you provide me with the code?
I am very new at this so pleas ekeep it simple :)

P.S> timer could also be set to start counting when the new page (Could use the url as a trigger) is loaded also, does not really have to be when the submit button is clicked.
The only thing is that the counter must keep counting until the user does a new search.
Posted 7-Dec-12 4:37am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Attach an event to the submit button like this:

WebBrowser1.Document.GetElementById("submitButton").Click=+ new HtmlElementEventHandler(submitButton_click);

Then within your submitButton_click event handler method you can set your timer.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Could you expand a bit on this, I am totaly new at this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web04 | 2.8.180621.3 | Last Updated 10 Dec 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100