[求助]窗体无法与AUTOCAD交互操作
在用.net的com技术对autocad编程时,窗体无法与AUTOCAD交互操作.<BR>代码如下:<BR>(显示窗体)<BR>Dim fm As New Form1<BR>Application.ShowModalDialog(Application.MainWindow, fm) 或 fm.ShowDialog()<BR>(窗体上的按钮代码)<BR>Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click<BR> Me.Hide()<BR> Dim ss As AcadSelectionSet <BR> On Error Resume Next<BR> Me.acadapp.ActiveDocument.SelectionSets.Item("*FQJY*").Delete()<BR> ss = Me.acadapp.ActiveDocument.SelectionSets.Add("*FQJY*")<BR> ss.Select(AcSelect.acSelectionSetWindow) <BR> Me.Show()<BR>End Sub<BR>在点击Button1按钮后窗体隐藏,命令行也有提示要我选取对象,可autocad界面仍是灰色,无法进行选取操作.<BR>是不是还有些工作要作?请大侠们指教,谢谢!
页:
[1]