2009年5月9日 星期六

Do_DownloadFileFromInternet_2009_05_10_AM_10_50_19

' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' '  [2009_05_10_AM_11_05_56]  ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
    Private Sub Do_DownloadFileFromInternet_2009_05_10_AM_10_50_19()
        ' (本段程式之目的) Purpose:
        '     Demo how to download an internet file
        '                "中華民國國旗歌 (Performed by 復興中學合唱團).mp3"
        '     Using My.Computer.Network.DownloadFile()
        '
        ' (本段程式是否已經在被使用中) In use: Yes
        ' (程式撰寫的進度) Developing: 100% (Mandatory)
        ' (程式堪用的程度) Workable: 80% (Threshold at 80%)
        ' (程式的測試程度) Code tested: 0% (max 99%)
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        ' (修改程式的日期) Revision Date: (2009 05 10 AM 10 45 11)
        ' (修改程式的人員) Revised by: WeiJin Tang (湯偉晉)
        '
        '     Version 1.00.02; Last Updated on [2009-05-10-AM-11-03-12]
        '
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        Dim URL As String
        URL = "http://tools.wj.googlepages.com/Anthem_of_the_Flag_of_Republic_of_Ch.mp3"

        Dim FP As String
        FP = "D:\WeiJin Tang\"

        Dim FNOfDestinationFile As String
        FNOfDestinationFile = "中華民國國旗歌 (Performed by 復興中學合唱團).mp3"

        Dim FPFNOfDestinationFile As String
        ' FPFNOfDestinationFile = FP & FNOfDestinationFile
        FPFNOfDestinationFile = IO.Path.Combine(FP, FNOfDestinationFile)

        Try
            My.Computer.Network.DownloadFile(URL, FPFNOfDestinationFile)

            Me.RichTextBox1.Text = "Finish downloading file at " & vbCr & URL

        Catch ex As Exception
            Me.RichTextBox1.Text = "Downloading of file " & vbCr & URL & vbCr & "Failed for the following reason:" & vbCr & ex.Message
        End Try

    End Sub ' Do_DownloadFileFromInternet_2009_05_10_AM_10_50_19
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' '  [2009_05_10_AM_11_05_56]  ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '

沒有留言: