如何触发“WebBrowser1_DocumentCompleted”有按钮的活动? [英] How to trigger "WebBrowser1_DocumentCompleted" event with a button?

查看:49
本文介绍了如何触发“WebBrowser1_DocumentCompleted”有按钮的活动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!我想知道,如何使用vb.net中的按钮触发此事件!

Hello! I want to know, how to trigger this event with a button in vb.net!

推荐答案

您好

一种方式:

One way:

创建一个新的Sub(我们称之为' NewSub ')

Create a new Sub (lets call it 'NewSub')

将代码从WebBrowser.Completed移动到 NewSub

Move the code from WebBrowser.Completed into the NewSub

在WebBrowser中,完成事件,拨打电话到 NewSub

In WebBrowser,Completed event, put a call to NewSub

在Button.Click处理程序中, 打电话给 NewSub

In the Button.Click handler,  put a call to NewSub


这篇关于如何触发“WebBrowser1_DocumentCompleted”有按钮的活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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