Click here to Skip to main content
11,412,389 members (68,129 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
rheald484
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 OriginalGriff 332
1 Sascha Lefévre 200
2 Sergey Alexandrovich Kryukov 140
3 Maciej Los 135
4 ProgramFOX 130
0 Sergey Alexandrovich Kryukov 9,025
1 OriginalGriff 7,247
2 Maciej Los 3,525
3 Abhinav S 3,248
4 Peter Leow 3,059


Advertise | Privacy | Mobile
Web03 | 2.8.150414.5 | 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