Microsoft Internet Controls 
Author Message
 Microsoft Internet Controls

Hi

Microsoft Internet Control has an activex control that gives me FTP
capabilities easily.

Are there any library references to this control that I can use to include
as a reference instead of a component so that I don't have to use a form in
my code?

regards
mn



Fri, 21 Nov 2003 14:02:58 GMT  
 Microsoft Internet Controls
You can reference WINNT\system32\MSINET.OCX

Sample code segment:

Dim m_URL As String

Public Event DataArrived(ByVal Data As String)

Public Property Get URL() As String
    URL = m_URL
End Property

Public Property Let URL(ByVal sNewURL As String)
    m_URL = sNewURL
End Property

Public Sub Connect()
    Set m_ITC = New InetCtlsObjects.Inet
    m_ITC.URL = m_URL
    m_ITC.Execute
End Sub

Public Sub Disconnect()
    m_ITC.Cancel
    Set m_ITC = Nothing

End Sub

Private Sub m_ITC_StateChanged(ByVal State As Integer)

   Select Case State
   ' ... Other cases not shown.

   Case icResponseCompleted ' 12
      Dim vtData As Variant ' Data variable.
      Dim strData As String: strData = ""
      Dim bDone As Boolean: bDone = False

      ' Get first chunk.
      vtData = m_ITC.GetChunk(1024, icString)
      DoEvents
      Do While Not bDone
         strData = strData & vtData
         DoEvents
         ' Get next chunk.
         vtData = m_ITC.GetChunk(1024, icString)
         If Len(vtData) = 0 Then
            bDone = True
         End If
      Loop

      RaiseEvent DataArrived(strData)
   End Select

End Sub

Peter



Fri, 21 Nov 2003 15:49:48 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. SHDocVW (Microsoft Internet Controls)

2. Microsoft Internet Controls Question

3. [Microsoft Internet Controls - Scroll Bar]

4. Microsoft Internet Controls (VB6)

5. Microsoft Internet Control and FTP

6. Microsoft Internet Controls

7. Help with the Microsoft Internet Control (for FTP)

8. Microsoft Internet Controls

9. Help using microsoft internet control

10. Microsoft Internet Control

11. NEED dependency file for Microsoft Internet Control Pack

12. Microsoft Internet Control Pack .ocx files

 

 
Powered by phpBB® Forum Software