Results 1 to 2 of 2

Thread: newform prob.

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    USA
    Posts
    37

    Exclamation

    I've created a prog. that connects to the internet through proxies. I have allowed multiple instances of the form to appear, but I want each new instance to scroll through the list of proxies that is stored in a listbox. The code is like this:

    Private Sub Command3_Click()
    Dim NewForm As New Form1

    NewForm.Show
    End Sub

    Private Sub Form_Load
    prox
    end sub

    Public Sub proxy()
    On Error GoTo err
    Dim prox As Integer
    List1.ListIndex = List1.ListIndex + 1
    Let prox = InStr(List1.Text, ":")
    Inet1.proxy = Left(List1.Text, prox - 1)
    Inet1.OpenURL "url"
    err:
    Select Case err.Number
    Case 35764
    MsgBox "Wait till its done Loading"
    End Select
    end sub

    I want each new form to select a new proxy. How can this be done?

  2. #2
    New Member
    Join Date
    Nov 2000
    Posts
    1

    Cool

    Option Explicit
    Dim bolDune As Boolean

    Private Sub Command3_Click()
    Dim NewForm As New Form1

    If Not List1.ListIndex < List1.ListCount Then
    NewForm.List1.ListIndex = List1.ListIndex + 1
    NewForm.Show
    Else
    MsgBox "Error End of Proxy List", vbCritical + vbOKOnly
    End If
    End Sub

    Private Sub Form_Activate()
    If Not bolDune Then
    prox
    bolDune = True
    End If
    End Sub

    Public Sub proxy()
    On Error GoTo err
    Dim prox As Integer
    List1.ListIndex = List1.ListIndex + 1
    Let prox = InStr(List1.List(List1.ListIndex), ":")
    Inet1.proxy = Left(List1.List(List1.ListIndex), prox - 1)
    Inet1.OpenURL "url"
    err:
    Select Case err.Number
    Case 35764
    MsgBox "Wait till its done Loading"
    End Select
    End Sub

    [Edited by Cork on 11-10-2000 at 03:56 PM]

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