Hi,all:
I just make a cad.net program with a simple winform.
when i hide the form or dispose the form, the autocad creen will flesh one time.
i saw the forms in autocad application not flesh when colse or hide them.
Is there any method let the form display silently?
best regards
swaywood
Solved! Go to Solution.
Solved by Balaji_Ram. Go to Solution.
anyone met this?
i know this question is not a cad question at all, it is a c# question, but any one can help me?
best regards
swaywood
sorry, the word 'flesh' i post in this message is 'flash', means '
hi,conormccartney:
thank you for your reply.
i just make one simple sample, which can only select a point.
the following is the code, and attached is the whole solustion file.
when i click the button, the screen will flash
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.EditorInput; using Autodesk.AutoCAD.Runtime; namespace ClassLibrary2 { public class Class1 { [CommandMethod("test")] public void test() { Form1 frm = new Form1(); Application.ShowModalDialog(frm); } } }
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.EditorInput; using Autodesk.AutoCAD.Runtime; namespace ClassLibrary2 { public partial class Form1 : Form { Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor; public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { this.Hide(); PromptPointOptions ppo = new PromptPointOptions("\nplease select a point:"); PromptPointResult ppr = ed.GetPoint(ppo); if (ppr.Status == PromptStatus.OK) { this.Show(); label1.Text = ppr.Value.ToString(); } } private void Form1_Load(object sender, EventArgs e) { label1.Text = "load"; } } }
Hi Swaywood,
You can also try the "EditorUserInteraction" :
http://adndevblog.typepad.com/autocad/2012/05/taking-mouse-inputs-from-a-modal-dialog-box.html
Regards,
Balaji