Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


VB .NET : opening web browser

This topic is 5818 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i have the following code to open a web brower. It works fine with VB6, but it doesnt with VB .NET Private Declare Function ShellExecute Lib _ "shell32.dll" Alias "ShellExecuteA" _ (ByVal hWnd As Long, ByVal lpOperation _ As String, ByVal lpFile As String, ByVal _ lpParameters As String, ByVal lpDirectory _ As String, ByVal nShowCmd As Long) As Long Call ShellExecute(0&, vbNullString, "http://www.google.com", vbNullString, vbNullString, 1) Any idea ? Thanks

Share this post

Link to post
Share on other sites
Something like this will do the trick:

System.Diagnostics.Process.Start( "http://www.google.com" );

If you need more control over the process, take a look at the docs for the Process class: ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfSystemDiagnosticsProcessClassTopic.htm

"It is precisely because it is fashionable for Americans to know no science, even though they may be well educated otherwise, that they so easily fall prey to nonsense. They thus become part of the armies of the night, the purveyors of nitwittery, the retailers of intellectual junk food, the feeders on mental cardboard, for their ignorance keeps them from distinguishing nectar from sewage."
Isaac Asimov

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!