AutoCAD Civil 3D Customization

AutoCAD Civil 3D Customization

Reply
Active Contributor
ebo134
Posts: 30
Registered: ‎12-15-2010
Message 1 of 4 (153 Views)

loosing focus

153 Views, 3 Replies
09-16-2012 12:11 PM

Hi, every one

I designed a window with a pick button, when I hit the button for selecting an alignment ,iam loosing the focus on autocad civil 3d 2013,what should I do to fix that

 

 

 

thanks

*Expert Elite*
Alfred.NESWADBA
Posts: 9,071
Registered: ‎06-29-2007
Message 2 of 4 (139 Views)

Re: loosing focus

09-16-2012 01:56 PM in reply to: ebo134

Hi,

 

what type of development are you working with? LISP, VBA, VB.NET, ARX, ....?

That is important to be able to give you any tips.

 

For dotNET I usually use

<DllImport("user32.dll")> _
Private Shared Function SetFocus(ByVal hwnd As System.IntPtr) As System.IntPtr
End Function

'and the call to that function
Call SetFocus(Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Window.Handle)

 

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Valued Mentor
ralstogj
Posts: 608
Registered: ‎10-01-2006
Message 3 of 4 (134 Views)

Re: loosing focus

09-16-2012 02:26 PM in reply to: Alfred.NESWADBA

Alfred

 

Sort ouf along the same lines but in reverse

 

I am trying to create catchments using the sendcommand and sendkeys as catchment objects are not exposed in the API yet. However on launching the command the Create Catchment Object dialog grabs the focus away from my code. Do you know anyway to return the focus to your code. I was thinking another dll with a windows hook listening for the dialog to appear but maybe you know a better way.

Regards

Justin Ralston
http://c3dxtreme.blogspot.com/
Active Contributor
ebo134
Posts: 30
Registered: ‎12-15-2010
Message 4 of 4 (95 Views)

Re: loosing focus

10-08-2012 09:37 AM in reply to: ralstogj

Thank you alfred, but it didnt work for me, can you have any other solution

 

 

 

thanks

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.