Html


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

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

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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center