我正在嘗試使用 LinkLabel 將我的程式的用戶定向到我的 Discord 服務器(以便他們可以報告錯誤等),但是每次我點擊它時,我都會收到一條錯誤訊息,提示“系統找不到指定的檔案”。
我正在使用,Process.Start("INVITE LINK")因為這是我在 Google 搜索問題時得到的絕大多數結果中找到的代碼。但是,這似乎在 Visual Studio 2019 中不起作用,正如我得到的錯誤所證明的那樣。要么,要么我忽略了一些東西(這不是第一次,因為我有點不正確閱讀東西的習慣)。
我確定我以前管理過它,但我終生無法記住它是如何完成的;我在這里問是希望有人能把我推向正確的方向。提前致謝。
uj5u.com熱心網友回復:
取自c# 中的一個答案,
using System.Diagnostics;
Process myProcess = new Process();
myProcess.StartInfo.UseShellExecute = true;
myProcess.StartInfo.FileName = "https://discord.gg/(invite code goes here)";
myProcess.Start();
在vb中沒有太大區別
Imports System.Diagnostics
Dim myProcess = New Process()
myProcess.StartInfo.UseShellExecute = True
myProcess.StartInfo.FileName = "https://discord.gg/(invite code goes here)"
myProcess.Start()
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/361772.html
