立即打开axwebbrowser控件 [英] opening an axwebbrowser control immediately
问题描述
我在Windows应用程序中有一个axwebbrowser控件,我希望它从
开始,用户的IE启动页面,并在表单打开时启动,但我不能得到
它以'加载事件的形式开始。我甚至尝试用
gobutton.performclick()结束加载事件
但是它不起作用;没有输入点击事件。
我有什么想法可以做到这一点吗?
感谢您的帮助。
Bernie Yaeger
I have an axwebbrowser control in a windows app and I want it to start at
the user''s IE start page, and to start when the form opens, but I can''t get
it to start in the form''s load event. I even tried ending the load event
with
gobutton.performclick() but it doesn''t work; the click event is not entered.
Any ideas how I can do this?
Thanks for any help.
Bernie Yaeger
推荐答案
伯尼,
这些都有效,但我不知道不知道
的特殊命令是默认的起始页面。 :o(
Bob
Private Sub Form1_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs)处理MyBase.Load
''***************************
''显示HTML
''***************************
''AxWebBrowser1.Navigate(CurDir()
+" \ myLocalHTMLFile.htm")
''TextBox1.Text()= http://www.foxnews.com/"
''AxWebBrowser1.Navigate(TextBox1.Text)
AxWebBrowser1.Navigate(" http:// www.foxnews.com/")
End Sub
Bernie,
These all work but I don''t know the special command to
the default start page to come up. :o(
Bob
Private Sub Form1_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
'' ***************************
'' Display the HTML
'' ***************************
''AxWebBrowser1.Navigate(CurDir()
+ "\myLocalHTMLFile.htm")
''TextBox1.Text() = "http://www.foxnews.com/"
''AxWebBrowser1.Navigate(TextBox1.Text)
AxWebBrowser1.Navigate("http://www.foxnews.com/")
End Sub
-----原帖---- -
我在Windows应用程序中有一个axwebbrowser控件,而我想要它从用户的IE启动页面开始,并在表单
打开时启动,但我可以'' t getit以加载事件的形式开始。我甚至尝试用b / b gobutton.performclick()来结束加载事件的
但是它没有ork;没有输入click
事件。
我有什么想法可以做到这一点吗?
感谢您的帮助。
Bernie Yaeger
。
-----Original Message-----
I have an axwebbrowser control in a windows app and I want it to start atthe user''s IE start page, and to start when the form opens, but I can''t getit to start in the form''s load event. I even tried ending the load eventwith
gobutton.performclick() but it doesn''t work; the click event is not entered.
Any ideas how I can do this?
Thanks for any help.
Bernie Yaeger
.
您可能也需要这些按钮。
如何使用WebBrowser控件的前进和后退按钮
http://support.microsoft。 com /?kbid = 163282
You will probably need these buttons, too.
How To Use Forward and Back Buttons for WebBrowser Control
http://support.microsoft.com/?kbid=163282
" Bernie Yaeger" <是***** @ cherwellinc.com> schrieb:
"Bernie Yaeger" <be*****@cherwellinc.com> schrieb:
我在windows应用程序中有一个axwebbrowser控件,我希望它从
用户的IE启动页面开始,并在表单打开时启动,但我可以它不会以'加载事件'的形式开始。我甚至尝试用
gobutton.performclick()结束加载事件
但是它不起作用;点击事件未被输入。
I have an axwebbrowser control in a windows app and I want it to start at
the user''s IE start page, and to start when the form opens, but I can''t get
it to start in the form''s load event. I even tried ending the load event
with
gobutton.performclick() but it doesn''t work; the click event is not
entered.
''PerformClick''仅在按钮可见并启用时才有效。将导航代码添加到单独的程序中,然后在
按钮'''点击''事件处理程序和表单''''中调用它''事件处理程序。
-
MS Herfried K. Wagner
MVP< URL:http:// dotnet .mvps.org />
VB< URL:http://dotnet.mvps.org/dotnet/faqs/>
''PerformClick'' will only work when the button is visible and enabled. Add
you navigation code to a separate procedure and call it from within the
button''s ''Click'' event handler and the form''s ''Load'' event handler.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
这篇关于立即打开axwebbrowser控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!