.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Prompt message issue with a modeless dialog

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
dynamicscope
708 Views, 2 Replies

Prompt message issue with a modeless dialog

Base: Object ARX 2010

Language: C# (.NET Frame 3.5)

 

Hi,

 

I made a modeless dialog  (WinForm) to use as a toolbar. The dialog has a button that "Prompt Entity" from the drawing.

 

ex)

PromptEntityOptions peo = new PromptEntityOption("Select Entity:");

PromptEntityResult per = ed.GetEntity(peo);

 

But this function is not wokring as I intended. When I click this button, the prompt message (message that sticks on the mouse cursor) does not show up immediately.

 

The message appears when I click the drawing window twice.

 

This behavior is not good since the user would not know if the button is clicked properly. (if the prompt message does not show up immediately.)

 

It seems like a focus (window) issue to me.

 

How could I solve this issue?

Any idea?

 

Regards,

 

Jake

 

2 REPLIES 2
Message 2 of 3
bojko108
in reply to: dynamicscope

I saw this in one other topic. Try to use Autodesk.AutoCAD.Internal.Utils.SetFocusToDwgView()

Message 3 of 3
Irvin
in reply to: dynamicscope

There are other Methods than using the setfocus to dwg:

 

Look at the next snipped:

 

private void btnPickPoint_Click(object sender, EventArgs e)
        {
            using (EditorUserInteraction edUsrInt = ed.StartUserInteraction(this))
            {
                // Code to select a point
PromptPointOptions prPtOpts = new PromptPointOptions("\nSpecify insertion base point:"); PromptPointResult prPtRes = ed.GetPoint(prPtOpts); _point = prPtRes.Value; tbX.Text = _point.X.ToString(); tbY.Text = _point.Y.ToString(); tbZ.Text = _point.Z.ToString(); // End the UserInteraction. edUsrInt.End(); //this.Focus(); } }

 Hope this will help!

 

Irvin

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost