Results 1 to 14 of 14

Thread: [Resolved By: Ethan37 ,RobDog888]how do i download file from http?

  1. #1

    Thread Starter
    Addicted Member Incures's Avatar
    Join Date
    May 2006
    Location
    south afrika
    Posts
    205

    Resolved [Resolved By: Ethan37 ,RobDog888]how do i download file from http?

    i need the simplest way to download file while im openning a program
    i need the program to download information file every time that peopele
    will start it, i case of update...

    *to summeise it all, i need function for downloading file from Http port 80 only

    thank you m8ts,
    Last edited by Incures; May 1st, 2007 at 07:06 PM.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [question]how do i download file from http?

    Use the Inet control.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Addicted Member Incures's Avatar
    Join Date
    May 2006
    Location
    south afrika
    Posts
    205

    Re: [question]how do i download file from http?

    Quote Originally Posted by RobDog888
    Use the Inet control.
    which means?
    im practicly new...i dont know much about VB6 =\
    explain me abit more about it, thanks

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [question]how do i download file from http?


  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [question]how do i download file from http?

    Sorry, add the control to your toolbox first "Microsoft Internet Transfer Control"
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: [question]how do i download file from http?

    Quote Originally Posted by Incures
    which means?
    im practicly new...i dont know much about VB6 =\
    explain me abit more about it, thanks

    The Inet control
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [question]how do i download file from http?

    Ive done this before to download my avatar from vbf into an image control on a form.
    Note: this was for the old format as since the upgrade it may be different now.

    Edit: Why is everyone so quick to direct members away from VBF?

    Code:
        Inet1.UserName = msMemberName
        Inet1.Password = msPassWord
    
        'LINK IMAGE CONTROL TO AVATAR
        b() = Inet1.OpenURL("http://www.vbforums.com/avatar.php?userid=" & msMemberID & "&dateline=1037488934", icByteArray)
        If Dir("D:\Profile.gif") <> "" Then
            Kill "D:\Profile.gif"
        End If
        Open "D:\Profile.gif" For Binary As #1
            Put #1, , b()
        Close #1
        imgAvatar.Picture = LoadPicture("D:\Profile.gif")
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  8. #8

    Thread Starter
    Addicted Member Incures's Avatar
    Join Date
    May 2006
    Location
    south afrika
    Posts
    205

    Re: [question]how do i download file from http?

    Quote Originally Posted by RobDog888
    Ive done this before to download my avatar from vbf into an image control on a form.
    Note: this was for the old format as since the upgrade it may be different now.

    Edit: Why is everyone so quick to direct members away from VBF?

    Code:
        Inet1.UserName = msMemberName
        Inet1.Password = msPassWord
    
        'LINK IMAGE CONTROL TO AVATAR
        b() = Inet1.OpenURL("http://www.vbforums.com/avatar.php?userid=" & msMemberID & "&amp;dateline=1037488934", icByteArray)
        If Dir("D:\Profile.gif") <> "" Then
            Kill "D:\Profile.gif"
        End If
        Open "D:\Profile.gif" For Binary As #1
            Put #1, , b()
        Close #1
        imgAvatar.Picture = LoadPicture("D:\Profile.gif")
    ok thx , but i case i wanna download the file :
    name: version.dll
    remote path: mu-eternal.no-ip.org/updates/
    local path : D:\

    what do i need to change..
    and what defines / referrences do i need to add?
    please be more specific

  9. #9
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [question]how do i download file from http?

    No references, just adding the Inet control like I posted earlier.

    To download a different file change the link url to your desired source file location and then the "D:\Profile.gif" will be the destination location for you to change as you need.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  10. #10

    Thread Starter
    Addicted Member Incures's Avatar
    Join Date
    May 2006
    Location
    south afrika
    Posts
    205

    Re: [question]how do i download file from http?

    Quote Originally Posted by RobDog888
    No references, just adding the Inet control like I posted earlier.

    To download a different file change the link url to your desired source file location and then the "D:\Profile.gif" will be the destination location for you to change as you need.
    ok i added the Inet control.
    i did changed the Url and the Direction settings, still not respose.
    My code: ....whats wrong =\.." runtime error 13 , type miss match"
    Code:
    Dim b() As String
    
    Private Sub Command1_Click()
       Inet1.UserName = msMemberName
        Inet1.Password = msPassWord
    
        'LINK IMAGE CONTROL TO AVATAR
        b() = Inet1.OpenURL("http://mu-eternal.no-ip.org/updates/XXX.exe", icByteArray)
        If Dir("D:\XXX.exe") <> "" Then
            Kill "D:\XXX.exe"
        End If
        Open "D:\XXX.exe" For Binary As #1
            Put #1, , b()
        Close #1
        'imgAvatar.Picture = LoadPicture("D:\XXX.exe")
        MsgBox ("file saved")
    End Sub

  11. #11
    Lively Member
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    80

    Re: [question]how do i download file from http?

    i need the simplest way to download file while im openning a program
    i need the program to download information file every time that peopele
    will start it, i case of update...
    maybe you will like this :

    Code:
    Option Explicit
    Private Declare Function DoFileDownload Lib "shdocvw.dll" (ByVal lpszFile As String) As Long
    
    Private Sub Command1_Click()
    'this prompts for downloading though
       DoFileDownload StrConv("http://www.google.com/intl/en_ALL/images/logo.gif", vbUnicode)
    End Sub

  12. #12

    Thread Starter
    Addicted Member Incures's Avatar
    Join Date
    May 2006
    Location
    south afrika
    Posts
    205

    Re: [question]how do i download file from http?

    i need it on the back , like they suggest me..
    but please try to answer my problem
    tow posts above

  13. #13
    Lively Member
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    80

    Re: [question]how do i download file from http?

    ok!

    Dim b() As String
    should be:

    Code:
    Dim b() as Byte

  14. #14

    Thread Starter
    Addicted Member Incures's Avatar
    Join Date
    May 2006
    Location
    south afrika
    Posts
    205

    Re: [question]how do i download file from http?

    thank you very much!

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