Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 2nd, 2005, 08:54 AM
Authorized User
Join Date: Sep 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default Launch default browser in a new browser window

Hi all,

I want to launch default browser in a new browser window by using the code below:

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&, "open", "www.google.de", vbNullString, vbNullString, SW_SHOWNORMAL)

But if there are browser windows opened, this code does not open a new browser window. The current open window is used. Does anybody know how to open a new browser window to launch default browser?

Thanks in advance,

Old August 30th, 2005, 05:48 PM
Authorized User
Join Date: Aug 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts

In 'internet options" under teh advanced tab, there is an option labeled "reuse browser window for launching shortcuts". if checked, it appears to load in the same window. This might be an application setting that is not overridable from your external code...

Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding Default Browser lowell Visual Basic 2005 Basics 0 March 23rd, 2007 08:36 PM
Find default browser lowell Beginning VB 6 2 March 22nd, 2007 08:21 AM
launch executable from browser geogomez Javascript How-To 5 August 1st, 2006 10:45 AM
launch IE browser & control scroll bars ? gjelson VB How-To 0 March 15th, 2006 11:20 PM
default browser dwz VB How-To 1 November 10th, 2003 08:55 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.