itsryan

I have been making a internet browser in visual studio and I would like to know how to make my browser be set up so I can put it as my default browser and the same for my friends when they use it.

Another thing I would like to know is how can I make my internet browser open up a new window. I have the menu set up but I need to know the code, so when you click on new window a new window will open.




Re: Visual Basic Express Edition Putting as default browser

ReneeC

Browser registration is discussed here. http://support.microsoft.com/kb/297878

By opening a new window do you mean in a tab control






Re: Visual Basic Express Edition Putting as default browser

itsryan

I mean as a new window not a tab.

I will put tabs on later.






Re: Visual Basic Express Edition Putting as default browser

ReneeC

I'm still confused and I've had a lot experience with the web browser. By "new window" do you want it on the same form replacing the old one or a new copy of your webbrowser process running separately






Re: Visual Basic Express Edition Putting as default browser

itsryan

A new copy of your webbrowser process running separately.




Re: Visual Basic Express Edition Putting as default browser

ReneeC

Ok that EASY!!!!!!!!!!

AT the beginning of your program in the form load event do this:

Dim Url as string = If System.Environment.GetCommandLineArgs()

If Url <> "" then webrowser.Navgate(URL)

Whoever wants to activate a New window must do a Process.Start with the URL as a swicthes argument






Re: Visual Basic Express Edition Putting as default browser

itsryan

Well I mean I want it to open a new window after you click a button that I have on my menu.




Re: Visual Basic Express Edition Putting as default browser

ReneeC

Ok, have the code in the button's event do a process start with the desired URL. If you don't want a URL just do a Process.Start without a URL.






Re: Visual Basic Express Edition Putting as default browser

itsryan

Im sorry, but can you like give me a sample of what you mean because I'm not having alot of luck.




Re: Visual Basic Express Edition Putting as default browser

ReneeC

Not yet, because I don't have an adequate specification from you to give you what you need. You say you want a new window. Do you want anything in it Meaning is it to be a blank window, or do you want to pass a URL to it






Re: Visual Basic Express Edition Putting as default browser

itsryan

I would like it so when you click on the button then window pops up and google will be there.




Re: Visual Basic Express Edition Putting as default browser

ReneeC

 

 

Private Sub cbGo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbGo.Click

            Process.Start("www.google.com")

End Sub

Set the name in yellow to your button name.






Re: Visual Basic Express Edition Putting as default browser

itsryan

Ok thanks, I got it.