xxpor Posted June 24, 2004 Share Posted June 24, 2004 Does ne1 know how to make the default internet browser launch in vb.net Link to comment Share on other sites More sharing options...
0 John Veteran Posted June 24, 2004 Veteran Share Posted June 24, 2004 Launch when? :huh: What are you trying to do? Link to comment Share on other sites More sharing options...
0 xxpor Posted June 24, 2004 Author Share Posted June 24, 2004 I have a LinkLabel to neowin.net and i want it to open the default browser and go to neowin.net Link to comment Share on other sites More sharing options...
0 John Veteran Posted June 24, 2004 Veteran Share Posted June 24, 2004 Hmm, I don't know :unsure: I know in C# there's an "Always Use Internet Explorer" flag in the project's properties you can set to false. But I think it should open the default browser by itself :huh: Link to comment Share on other sites More sharing options...
0 azcodemonkey Posted June 24, 2004 Share Posted June 24, 2004 Imports System.Diagnostics ... Dim psi as ProcessStartInfo = new ProcessStartInfo() psi.FileName = linkLabel1.Text psi.Verb = "open" Process.Start( psi ) ... Link to comment Share on other sites More sharing options...
0 John Veteran Posted June 24, 2004 Veteran Share Posted June 24, 2004 :o Nifty... Link to comment Share on other sites More sharing options...
0 xxpor Posted June 24, 2004 Author Share Posted June 24, 2004 An unhandled exception of type 'System.ComponentModel.Win32Exception' occurred in system.dll Additional information: The system cannot find the file specified Link to comment Share on other sites More sharing options...
0 xxpor Posted June 24, 2004 Author Share Posted June 24, 2004 meh, i forgot the http://www. part. it doesnt work without that Link to comment Share on other sites More sharing options...
0 azcodemonkey Posted June 24, 2004 Share Posted June 24, 2004 Sorry... you'll probably want the linkdata of the of the link clicked, not the text, unless the text is the actual URL. Also, it helps if you post the code that you think may be causing the problem. Troubleshooting from just an exception is difficult, or impossible. An example... Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked Dim psi As ProcessStartInfo = New ProcessStartInfo psi.FileName = CType(e.Link.LinkData, String) psi.Verb = "open" Process.Start(psi) End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load LinkLabel1.Links.Add(0, LinkLabel1.Text.Length, "https://www.neowin.net") End Sub [edit] cool. glad you got it. Link to comment Share on other sites More sharing options...
0 Steven Posted June 24, 2004 Share Posted June 24, 2004 ehh.. i just do Process.Start("https://www.neowin.net") And it works. Whats all that other stuff weenur? :p Link to comment Share on other sites More sharing options...
0 Winston Posted June 25, 2004 Share Posted June 25, 2004 ehh.. i just do Process.Start("https://www.neowin.net") And it works. Whats all that other stuff weenur? :p yeah that's what i do too System.Diagnostics.Process.Start("https://www.neowin.net"); Link to comment Share on other sites More sharing options...
0 Large Posted June 25, 2004 Share Posted June 25, 2004 ehh.. i just do Process.Start("https://www.neowin.net") And it works. Whats all that other stuff weenur? :p Just what I was going to say, its a single line of code ! :happy: Link to comment Share on other sites More sharing options...
0 azcodemonkey Posted June 25, 2004 Share Posted June 25, 2004 OK, smartasses. :) I was trying to be illustrative. Obviously the guy is a noob. All you veterans can take shortcuts and have an understanding of what is going on... Smartasses. ;) Link to comment Share on other sites More sharing options...
0 Winston Posted June 26, 2004 Share Posted June 26, 2004 OK, smartasses. :) I was trying to be illustrative. Obviously the guy is a noob. All you veterans can take shortcuts and have an understanding of what is going on...Smartasses. ;) My bum cheek isn't intelligent :p Link to comment Share on other sites More sharing options...
Question
xxpor
Does ne1 know how to make the default internet browser launch in vb.net
Link to comment
Share on other sites
13 answers to this question
Recommended Posts