cooolseee 发表于 2014-11-10 09:52:00

关于CAD对话框

我用VS2010做了一个对话框,保存为EXE格式。然后新建一个类库文件,引用添加对话框文件,并添加相应的命名空间。然后新建对话框类对象,用以下代码时,出现问题:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using 电码化;
using Autodesk..Runtime;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.Windows;
using Autodesk.AutoCAD.DatabaseServices;
namespace NetSelection
{
    public class from
    {
      
      public void dmhd()
      {
            FormDMH forms = new FormDMH();
            Application.ShowAlertDialog("aaa");
            Application.ShowModalDialog(forms);
      }
    }
}
以上代码中, 最后一句Application.ShowModalDialog(forms);提示如下:
错误      1      与“Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog(System.Windows.Forms.Form)”最匹配的重载方法具有一些无效参数      D:\00 C#代码-我的\信号辅助设计\NetSelection\NetSelection\from.cs      23      13      NetSelection
错误      2      参数 1: 无法从“电码化工具.FormDMH”转换为“System.Windows.Forms.Form”      D:\00 C#代码-我的\信号辅助设计\NetSelection\NetSelection\from.cs      23      41      NetSelection
请高手指点。
页: [1]
查看完整版本: 关于CAD对话框