Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
TitleDisplay a Web page in the system's default browser
DescriptionThis example shows how to display a Web page in the system's default browser in Visual Basic 6 using the ShellExecute API function.
KeywordsWeb page, launch, browser, default browser
CategoriesUtilities
 
Use the ShellExecute API function to "open" the Web page.
 
Private Sub cmdOpen_Click()
    ' Send this to ShellExecute.
    ShellExecute ByVal 0&, "open", txtUrl.Text, _
        vbNullString, vbNullString, SW_SHOWMAXIMIZED
End Sub
 
Note that ShellExecute passes the final parameter, SW_SHOWMAXIMIZED, to the application (in this case, the browser) and the application decides whether to honor it. Internet Explorer seems to ignore it if it is reusing an existing Internet Explorer window but it maximizes the window if it is creating a new window.
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated