Click here to Skip to main content
15,937,003 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

Attach an event to the submit button like this:

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


Then within your submitButton_click event handler method you can set your timer.
 
Share this answer
 
Could you expand a bit on this, I am totaly new at this.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900