WebBrowser Errors - VB 2008
- Click16
- Posts: 1941
- Joined: Mon Dec 31, 2007 4:36 am
- Location: United States
WebBrowser Errors - VB 2008
I need a bit of help... Lets just say i make a simple application.
Includes:
Webbrowser
textbox1
button1
panel1
_________
Coding:
Button 1 : Me.Webbrowser1.navigate(me.textbox1.text)
_________
Testing:
It works for the most part but if i click a link watch what happens:
after its clicked
Please, i need some help. i tried all i could and nothing worked
thanks
Includes:
Webbrowser
textbox1
button1
panel1
_________
Coding:
Button 1 : Me.Webbrowser1.navigate(me.textbox1.text)
_________
Testing:
It works for the most part but if i click a link watch what happens:
after its clicked
Please, i need some help. i tried all i could and nothing worked
thanks
- Aumaan Anubis
- Staff
- Posts: 1812
- Joined: Thu Dec 13, 2007 12:18 am
- Contact:
Re: WebBrowser Errors - VB 2008
It's because Mozilla is set as your default browser.
And no, I have no idea how to fix it.
And no, I have no idea how to fix it.
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: WebBrowser Errors - VB 2008
A long time ago, I spent a fair amount of time trying to solve is but as far as I'm aware its not possible.
- Gary
- Posts: 1946
- Joined: Thu Feb 14, 2008 10:17 pm
- Location: USA, FL
- Contact:
Re: WebBrowser Errors - VB 2008
I know it is, I know someone who made a Web Browser.
I'll Ask him.
I'll Ask him.
- OwnZ joO
- Posts: 1197
- Joined: Sun Dec 09, 2007 4:46 pm
Re: WebBrowser Errors - VB 2008
Why are you trying to make a browser out of the .net one anyway, why don't you just use Firefox? If you were making the whole thing by yourself and not using the .Net WebBrowser control there would be a learning experience in it, but this is just reinventing the wheel by taking someone elses and then taking out features...
- Click16
- Posts: 1941
- Joined: Mon Dec 31, 2007 4:36 am
- Location: United States
Re: WebBrowser Errors - VB 2008
It's not that. I am still working of FTP Pro and i need to be able to open folders in the Xbox browser in order for this to work right.
The connect to system is FAR more advanced. Allowing you to select where you want to go!
Example:
Connect To> [Xbox name]>[Directory]>[Games]>[folder name]>Maps
or for application sending.
Connect To> [Xbox name]>[Directory]>[Apps]
If you want a preview picture of what its becoming.
The connect to system is FAR more advanced. Allowing you to select where you want to go!
Example:
Connect To> [Xbox name]>[Directory]>[Games]>[folder name]>Maps
or for application sending.
Connect To> [Xbox name]>[Directory]>[Apps]
If you want a preview picture of what its becoming.
- Prey
- Posts: 129
- Joined: Sat Dec 29, 2007 5:06 pm
- Location: UK
Re: WebBrowser Errors - VB 2008
It's quite possible
Code: Select all
Private Sub WebBrowser1_NewWindow(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow
' Stop the opening of a new window.
e.Cancel = True
' If the user clicked a link, navigate to it in the current window.
Dim curElement As HtmlElement = WebBrowser1.Document.ActiveElement
If curElement.TagName.ToLower() = "a" Then
Dim linkStr As String = curElement.GetAttribute("href")
WebBrowser1.Navigate(linkStr)
End If
End Sub
- Click16
- Posts: 1941
- Joined: Mon Dec 31, 2007 4:36 am
- Location: United States
Re: WebBrowser Errors - VB 2008
this works for a web browser but doesn't work for ftping to your xbox. it gives me the same results.
- Prey
- Posts: 129
- Joined: Sat Dec 29, 2007 5:06 pm
- Location: UK
Re: WebBrowser Errors - VB 2008
I'm sure you can modify it to work for you. Take a look at the WebBrowser.Document and other properties to see what you can hook onto instead of 'a'.
-
- Posts: 710
- Joined: Thu Jan 03, 2008 5:29 pm
Re: WebBrowser Errors - VB 2008
Who the fuck plays that game. gash!!!
-
- Posts: 1974
- Joined: Sun Jan 27, 2008 4:50 am
Re: WebBrowser Errors - VB 2008
I know I'm bumping an old topic but how do I convert that to C#? That may sound stupid but I just started learning C# and all the tuts I've found were the very basics.Prey wrote:It's quite possibleCode: Select all
Private Sub WebBrowser1_NewWindow(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow ' Stop the opening of a new window. e.Cancel = True ' If the user clicked a link, navigate to it in the current window. Dim curElement As HtmlElement = WebBrowser1.Document.ActiveElement If curElement.TagName.ToLower() = "a" Then Dim linkStr As String = curElement.GetAttribute("href") WebBrowser1.Navigate(linkStr) End If End Sub
In Soviet Russia, DS touches you. Say it again and I'll do more than touch. ~DS -Oh babyDemonicSandwich wrote:See that? You see that how it is highlighted down here but it's not highlighted right there? Ah, I guess that's what I get for pirating it.
A cat was licking itself to the sound of potato chips.
- OwnZ joO
- Posts: 1197
- Joined: Sun Dec 09, 2007 4:46 pm
Re: WebBrowser Errors - VB 2008
[code]
private void webBrowser1_NewWindow(object sender, CancelEventArgs e)
{
// stop the opening of a new window
e.Cancel = true;
// if the user clicked a link, naviage to it in the current window
HtmlElement curElement = WebBrowser1.Document.ActiveElement;
if(curElement.TagName.ToLower() == "a")
{
string linkStr = curElement.GetAttribute("href");
WebBrowser1.Navigate(linkStr);
}
}
[/code]
private void webBrowser1_NewWindow(object sender, CancelEventArgs e)
{
// stop the opening of a new window
e.Cancel = true;
// if the user clicked a link, naviage to it in the current window
HtmlElement curElement = WebBrowser1.Document.ActiveElement;
if(curElement.TagName.ToLower() == "a")
{
string linkStr = curElement.GetAttribute("href");
WebBrowser1.Navigate(linkStr);
}
}
[/code]
- Click16
- Posts: 1941
- Joined: Mon Dec 31, 2007 4:36 am
- Location: United States
Re: WebBrowser Errors - VB 2008
Ok well all of this info is good and stuff, but it still doesn't solve my problem. I need to know how a real FTP Program would work. (Smart FTP Client, Flash FXP, FileZilla, etc.)