在下載文件之前,ReadLine方法有問題。 當程序啓動時,出現「Downloaading file ...」文本,但我必須點擊「enter」才能繼續前進,因爲沒有它,程序將在ReadLine之後停止。我嘗試了Console.Read()和Console.ReadKey(),但它們都是一樣的,它在下載之後但是在它之前工作,它停止了整個程序,很奇怪......; /我想說「下載文件... 「並且文件將被下載時,說」您的文件已下載!「。謝謝閱讀! :)(我出於安全原因改變了網址)。ReadLine()停止程序
Imports System.IO
Imports System.IO.Compression
Module AutoUpdater
Sub Main()
Console.WriteLine("Downloading file...")
Console.ReadLine()
My.Computer.Network.DownloadFile _
("http://blssss.cba.pl/rogue.rar", _
"C:\Documents and Settings\All Users\rogue.rar")
Console.WriteLine("Your File Is Downloaded!")
Console.ReadLine()
End Sub
End Module
'ReadLine'停止所有執行***直到它接收到的用戶輸入***。當然,它會停下來,如果你不想讓它停止執行,請將其刪除... – Codexer