vb.net怎样调用CAD的颜色对话框
vb.net怎样调用CAD的颜色对话框本帖最后由 utopio 于 2023-8-29 12:23 编辑
以C#为例
var colordlg = new Autodesk.AutoCAD.Windows.ColorDialog();
if (colordlg.ShowDialog() == DialogResult.OK)
{
ColorIndex = colordlg.Color.ColorIndex;
}
utopio 发表于 2023-8-29 12:22
以C#为例
谢谢
也在网上搜到https://www.cnblogs.com/JJBox/p/11610343.html#_label1
Dim cd = New Autodesk.AutoCAD.Windows.ColorDialog()
Dim dr = cd.ShowDialog()
If dr = System.Windows.Forms.DialogResult.OK Then
ed.WriteMessage(vbLf & "CAD颜色选择了: " & cd.Color.ToString())
CmdTest_ShowDialog = cd.Color.ColorIndex '.ColorValue
Else
CmdTest_ShowDialog = 1
End If 打开 CAD的颜色对话框
但焦点不在窗体上,还要单击一次
页:
[1]