Visual Studio 2012计时器浏览器控制 [英] Visual Studio 2012 timer browser contros

查看:106
本文介绍了Visual Studio 2012计时器浏览器控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个VB Windows窗体应用程序,我在Visual Studio 2012中创建,它包含一个Web浏览器窗口和一个计时器(秒表)



当你启动应用程序浏览器设置为打开一个网页,其中包含一个人可以在日志编号中输入的表单,然后选择提交按钮。

然后将它们带到一个页面日志细节。



我想要发生的是当用户在浏览器中选择查找(提交)按钮时,秒表(计时器)开始计数。 br />
当另一个人查看时,计数器归零并重新开始。



有一种简单的方法可以做到这一点吗?给我提供代码?

我是非常新的,所以请求保持简单:)



P.S>计时器也可以设置为在新页面(可以使用url作为触发器)也被加载时开始计数,当点击提交按钮时实际上不必是。

唯一的事情是计数器必须继续计数,直到用户进行新的搜索。

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.

推荐答案

将事件附加到提交按钮,如下所示:



Attach an event to the submit button like this:

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





然后在你的submitButton_click事件处理程序方法中,你可以设置你的计时器。



Then within your submitButton_click event handler method you can set your timer.


你可以扩展一下,我完全是新的。
Could you expand a bit on this, I am totaly new at this.


这篇关于Visual Studio 2012计时器浏览器控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆