DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Thread: Html

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    Html

    [Originally posted by Black]

    How to open a html-file by the default browser (in VB of course...)

    Thanks

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Html

    [Originally posted by JPicasso]

    Put this under a button or click event
    dim lreturn as long

    lreturn = ShellExecute(0&, "Open", "www.myaddress.com", "", vbNullString, 1)

    if lreturn is 0 then there's a problem.



    put this in a module.
    Public 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


    I stripped this out of the hyperlink control found on this site.ÿ Their control let you put graphics or text on a form to display the link.
    I just needed it under a command button.

    Hope this helps

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links