Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 20th, 2006, 10:24 AM
Authorized User
 
Join Date: Dec 2004
Location: Utraula, U.P., India.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default How copy Any file on LAN

hi every one
please tell me how any file copy on LAN in Vb 6.0
and which control and component will use.

Plz help me

Reply With Quote
  #2 (permalink)  
Old March 21st, 2006, 09:43 AM
Registered User
 
Join Date: Oct 2005
Location: Lucknow, UP, India.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hello rahul
You can use Microsoft Internet Transfer Control 6.0.
following code is ur remedy


Dim Size As Long, Remaining As Long, FFile As Integer, Chunk() As Byte

    Inet1.Execute "http://www.codeguru.com/forum/images/cg-logo.gif", "GET"

    Do While Inet1.StillExecuting
        DoEvents
    Loop

    Size = CLng(Inet1.GetHeader("Content-Length"))
    Remaining = Size

    FFile = FreeFile
    Open "c:\logo.gif" For Binary Access Write As #FFile
    Do Until Remaining = 0

        If Remaining > 1024 Then
            Chunk = Inet1.GetChunk(1024, icByteArray)
            Remaining = Remaining - 1024
        Else
            Chunk = Inet1.GetChunk(Remaining, icByteArray)
            Remaining = 0
        End If

        Put #FFile, , Chunk

    Loop
    Close #FFile

    MsgBox "File downloaded"

End Sub


bye

kvingupta@rediffmail.com



Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy one sheet to another file shamigc Excel VBA 2 April 13th, 2005 06:45 AM
Macro to copy data from one file to a 2nd file chadpodsednik Excel VBA 1 October 29th, 2004 10:40 AM
How to copy file? eapsokha Classic ASP Databases 2 November 14th, 2003 11:44 AM
JProgressBar while file copy rpalanivelu J2EE 0 November 3rd, 2003 08:40 AM



All times are GMT -4. The time now is 10:31 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.