楼上正解,多谢大侠指点。- Imports Autodesk.AutoCAD.DatabaseServices
- Imports Autodesk.AutoCAD.Windows '.OpenFileDialog
- Imports Autodesk.AutoCAD.ApplicationServices
- Imports Autodesk.AutoCAD.Runtime
- Imports Autodesk.AutoCAD.LayerManager.LayerFilter
- 'E:\我的磁盘\源代码\VB.net\vb.net程序\lsp函数对话框(lispdialog)\lsp函数对话框(lispdialog)\bin\Debug\lsp函数对话框(lispdialog).dll
- Public Class CADnet
- <LispFunction("LispDialog")> _
- Public Sub LispDialog(ByVal rbArgs As ResultBuffer)
- 'Dim Myvar As String = Application.GetSystemVariable("USERS1")
- Try
- Dim Myfile As String = ""
- If rbArgs = Nothing Then
- Dim sFilter As String = "*"
- Dim MLsDlog As New OpenFileDialog("打开----江河梦小组", "", sFilter, "", OpenFileDialog.OpenFileDialogFlags.AllowMultiple)
- Dim Fname As String = ""
- MLsDlog.ShowDialog()
- If MLsDlog.ShowDialog() <> DialogResult.OK Then
- Exit Sub
- Else
- For Each Fname In MLsDlog.GetFilenames()
- Myfile = Myfile & Fname & ","
- Next
- Application.SetSystemVariable("USERS1", Myfile)
- MLsDlog = Nothing
- End If
- End If
- Catch e As Exception
- End Try
- End Sub
- End Class
但是为何点击取消后,这个对话框会再弹出来一次,再点击才会消失,请再指点一下!谢谢 |