Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

? asked in 電腦與網際網路程式設計 · 1 decade ago

VB該如何執行網路捷徑並紀錄站暫存位置?

VB該如何執行網路捷徑(*.url)並紀錄站暫存位置?

例如我執行了xxx.url,而在C:\\Documents and Settings\\XXXX\\Local Settings\\Temporary Internet Files\\Content.IE5\\…………等產生了一個檔案,我再執行該捷徑後,該如何自動取得此檔案之位置並用來執行呢?

Update:

該檔案並非網頁黨

Update 2:

.exe檔以及.txt檔

Update 3:

應該是txt才對~_~

Update 4:

他不會產生一個檔案在這底下嗎?

Update 5:

是的

1 Answer

Rating
  • 阿戊
    Lv 7
    1 decade ago
    Favorite Answer

    '使用INET元件(Microsoft Internet Transfer Control):Private Sub Command1_Click()    Dim URL1 As String    URL1 = "http://xn--ses14h63hhyvugi/test.txt%22    Dim b() As Byte    b() = Inet1.OpenURL(URL1, icByteArray)    Open "c:\DL_Text.Txt" For Binary As #1 '另存至指定位置    Put #1, , b()    Close #1    '顯示    'Debug.Print b    'Text1.Text = bEnd Sub

Still have questions? Get your answers by asking now.