Results 1 to 2 of 2

Thread: Internet Transfer Control

  1. #1

    Thread Starter
    Hyperactive Member pgrimes's Avatar
    Join Date
    Aug 2001
    Location
    sacramento
    Posts
    342

    Question Internet Transfer Control

    Hi,

    I'm working on something to check an ftp site for the existence of a file. If it exists, I want it to be downloaded.

    I started messing with the ITC (internet transfer control). The only information I've found about it is from a VB 6 reference. It seems some things have changed with the ITC in .NET.

    I can successfully connect to an ftp server like this:
    VB Code:
    1. Me.objInet.Protocol = InetCtlsObjects.ProtocolConstants.icFTP
    2.      Me.objInet.RemoteHost = strRemoteHost
    3.      Me.objInet.UserName = strUserName
    4.      Me.objInet.Password = strPassword
    5.      Me.objInet.OpenURL()

    I'm having trouble getting directory/file info. From what I've read, I this:
    VB Code:
    1. Me.objInet.Execute(, "DIR")
    Returns the names of all files in the current directory. I don't get an error from that line, but I'm unable to get a visual representation of the directory listing. I tried to assign what is returned to a Rich Text Box. But it seems that the method is returning an object, not a string. Also, it doesn't seem to have a "toString()" method.

    Can anyone point me to some readings on the ITC for .net, or point out what I'm doing wrong?

    Thanks,

    Paul

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Ok, the internet transfer control is a com control. You can use it, but it isn't recommended as it is old technology and there is a replacement for it in the .net framework.

    I believe everything you need is in the System.Net namespace and here are some links to help you get started....

    http://www.freevbcode.com/ShowCode.Asp?ID=4655

    http://www.visualbuilder.com/article...le.asp?id=1234

    http://www.dotnet247.com/247referenc...24/120397.aspx

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