Results 1 to 2 of 2

Thread: Netscape 4.51 (IE) and Listboxes

  1. #1

    Thread Starter
    Hyperactive Member Matt-D's Avatar
    Join Date
    Nov 1999
    Location
    Mettmann, Germany
    Posts
    305

    Arrow Open Netscape or Internet Explorer with Listbox

    There's a listbox with e.g. six items (Internet addresses).
    So, is it possible to open Netscpe six times with the
    addresses in this listbox ?


    Thanks for some ideas, Matt-D(eutschland)

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Sure!

    This will launch all the listbox items in a new browser window (the default one)

    Code:
    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
    Private Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (ByVal lpFile As String, ByVal lpDirectory As String, ByVal lpResult As String) As Long
    
    Public Sub Launch(URL As String)
    Dim PROG$
    PROG = FindEXE
    If Len(PROG) Then
        ShellExecute hWnd, "OPEN", PROG, URL, "", 1
    End If
    End Sub
    
    Function FindEXE() As String
    'I didn't wrote this, dunno who the author is, sorry.
    Dim Path$, fn%
    Path = Space(255)
    fn = FreeFile
    
    Open "C:\Temp.htm" For Output As #fn
    Close #fn
        
    FindEXE = Left(Path, FindExecutable("C:\Temp.htm", "", ByVal Path))
    Kill "C:\Temp.htm"
    End Function
    
    Private Sub LaunchUrls()
    Dim x&
    For x = 0 To List1.ListCount - 1
    Launch List1.List(x)
    Next x
    End Sub
    Just run LaunchUrls and you're done...
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width