Click here to Skip to main content
11,493,948 members (69,589 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VS2010
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 Smile | :)

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 5:37am
rheald487
Rate this: bad
good
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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 448
1 Nakul Chaudhari 240
2 OriginalGriff 225
3 F-ES Sitecore 219
4 CPallini 215
0 Sergey Alexandrovich Kryukov 10,237
1 OriginalGriff 8,730
2 Sascha Lefèvre 3,664
3 Maciej Los 3,392
4 Richard Deeming 2,500


Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 10 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

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