473,772 Members | 2,388 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

opening an axwebbrowser control immediately

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.perfor mclick() but it doesn't work; the click event is not entered.

Any ideas how I can do this?

Thanks for any help.

Bernie Yaeger
Nov 21 '05 #1
11 1063
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(ByVa l sender As System.Object,
ByVal e As System.EventArg s) Handles MyBase.Load
' *************** ************
' Display the HTML
' *************** ************

'AxWebBrowser1. Navigate(CurDir ()
+ "\myLocalHTMLFi le.htm")
'TextBox1.Text( ) = "http://www.foxnews.com/"
'AxWebBrowser1. Navigate(TextBo x1.Text)
AxWebBrowser1.N avigate("http://www.foxnews.com/")

End Sub

-----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.perfo rmclick() but it doesn't work; the click event is not entered.
Any ideas how I can do this?

Thanks for any help.

Bernie Yaeger
.

Nov 21 '05 #2
You will probably need these buttons, too.

How To Use Forward and Back Buttons for WebBrowser Control
http://support.microsoft.com/?kbid=163282
Nov 21 '05 #3
"Bernie Yaeger" <be*****@cherwe llinc.com> schrieb:
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.perfor mclick() but it doesn't work; the click event is not
entered.


'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/>

Nov 21 '05 #4
Bob,

Just 1 hint, did you ever look at "navigate2" ?
http://msdn.microsoft.com/library/de.../navigate2.asp

Cor
Nov 21 '05 #5
Hi Herfried,

Worked fine - thanks, as always!

Bernie
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:eV******** ********@TK2MSF TNGP15.phx.gbl. ..
"Bernie Yaeger" <be*****@cherwe llinc.com> schrieb:
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.perfor mclick() but it doesn't work; the click event is not
entered.


'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/>

Nov 21 '05 #6
Hi Cor,

Just took a look at navigate2; looks promising. I will play around with
it - I am after some way of referring, yes, not to a specific url, but
rather to the home page as established on any given pc.

Tx,

Bernie

"Cor Ligthert" <no************ @planet.nl> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
Bob,

Just 1 hint, did you ever look at "navigate2" ?
http://msdn.microsoft.com/library/de.../navigate2.asp

Cor

Nov 21 '05 #7
Hi Bob,

Tx for the help - you and others have me going in the right direction now.

Bernie
"BobAchgill " <an*******@disc ussions.microso ft.com> wrote in message
news:1f******** *************** *****@phx.gbl.. .
You will probably need these buttons, too.

How To Use Forward and Back Buttons for WebBrowser Control
http://support.microsoft.com/?kbid=163282

Nov 21 '05 #8
Bernie,

You mean this one?
http://msdn.microsoft.com/library/de...ods/gohome.asp

Cor
Nov 21 '05 #9
Hi Cor,

Yes, exactly! Tx.

Bernie

"Cor Ligthert" <no************ @planet.nl> wrote in message
news:eq******** ********@TK2MSF TNGP12.phx.gbl. ..
Bernie,

You mean this one?
http://msdn.microsoft.com/library/de...ods/gohome.asp

Cor

Nov 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1551
by: Lecture Snoddddgrass | last post by:
Hi, I noticed that my WinForms app was taking a while to start up. I stepped through the code to find out which line was causing the delay. The delay is occurring within one of my UserControls whose designer-generated InitializeComponent() method instantiates a web browser control and eventually calls EndInit() on it. It's that EndInit() call that takes several seconds to complete. What's odd is that my application makes extensive use...
4
4808
by: TF | last post by:
hi, i am using AxWebBrowser control in my C# dot.net windows application. i want to display a web page in the browser that needs some data sent to it through HTML Form 'POST' method. I saw a method 'Navigate' of AxWebBrowser control that has a parameter 'ref object postData' but didn't find any documentation about AxWebBrowser how to use it. i tried a string like "name1=value1&name2=value2" but it doesn't work. Any help?? Thanks
4
3787
by: Martin Ho | last post by:
Hey Everyone, I really hope there is someone who can figure out this problem. Honestly, I spent 3 days now trying to find the solution, but nothing works. I'll try to explain the problem shortly, so I don't take too much of your time. Problem:
1
2320
by: Mantorok | last post by:
Hi Is there anyway to get a WebBrowser to work without placing it on a form. I want to be able to instantiate a browser, complete some of the fields and submit, but whenever I try to navigate I get: An unhandled exception of type 'InvalidActiveXStateException' occurred in axinterop.shdocvw.dll
0
1588
by: beau | last post by:
Hi, I'm using the AxWebBrowser in a C# WinForms application. I've got the basics working, but need some help controlling the view options for browsing files. How can I disable the "WebView"/Tasks pane on the left side of the file view? I've looked around and know it can be done globally from the registry
3
10207
by: Clint MacDonald | last post by:
I have used the AxWebBrowser in a Visual Basic Project... I found that both Framework 1.0 and 1.1 had to be installed for it to work properly. I now have found that in Studio 2003, that the probablem has come back even if both are installed. When I open a windows form that has the Browser on it and try to Navigate to a page using the OnEnter or OnLoad events, the page just sits there and does
5
4674
by: RobKinney1 | last post by:
Oh--- I have about ripped all my hair out of my head on this one. I have spent many sleepless nights pondering, tweaking, and cursing this error. Please, please. Please I hope someone can help. I have a program with 2 web browsers (of type AxSHDocVw.AxWebBrowser). Whenever I click my simulated back button, my event listener fires and executes this command: myWebBrowser1.GoBack(); // simple, right? WRONG! Crashes here.
6
3768
by: Dave Booker | last post by:
It appears that I cannot correctly install the AxWebBrowser in VS2005. I can instantiate an "AxWebBrowser browser" and refer to its members, properties, and methods. I'm having trouble with the AxWebBrowser.Document: When I print browser.Document.GetType().ToString() at runtime, I get "mshtml.HTMLDocumentClass". But The VS2005 compiler does not recognize the member AxWebBrowser.Document as anything other than a System.Object -- e.g.,...
0
1124
by: tamarindm | last post by:
Hi, I have a csharp application, running multiple instances of AxWebBrowser at the same time. Each web browser requires the same cookie, set using InternetSetCookie. If one AxWebBrowser control is navigating, another control is not able to recognise the cookie. If I waited until the first control is complete navigating, then start navigating the second control, then it is able to recognise the cookie. Is this a known feature of the...
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4009
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2851
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.