在选择路径按钮这样写:
Dim dlg As New FolderBrowserDialog
Dim path As String
Dim userpath As String
If dlg.ShowDialog = DialogResult.Ok Then
path = dlg.SelectedPath
e.Form.Controls("下载路径").text = path
SaveConfigValue(userpath, path)
End If
在窗口加载这样写:
Dim dow As WinForm.TextBox = e.Form.Controls("下载路径")
If Dow.text = "" Then
Dow.text = GetConfigValue(userpath, path)
End If
提示我未声明变量,然后我这样写:
Dim userpath As String
Dim path As String
Dim dow As WinForm.TextBox = e.Form.Controls("下载路径")
If Dow.text = "" Then
Dow.text = GetConfigValue(userpath, path)
End If
然后又提示:
String 引用没有设置为 String 的实例。
参数名: s