IJCAD .Net Cannot Focus on Active Window

Asked 2 years ago, Updated 2 years ago, 75 views

I am developing using .Net at IJCAD 2015.

I want to set the focus to the active document, but I can't find a method that seems to be the case.
AutoCAD 2014 can be implemented in Document.Window.Focus(), but is it not available in IJCAD?

Please let me know if there is any other way.

.net ijcad

2022-09-30 19:23

1 Answers

The Document.Window.Focus() method is not implemented in IJCAD 2015.However, you can do this with MFC.

Private Declare Function SetFocus Lib "user32.dll" (ByVal hwnd As IntPtr) As IntPtr

After declaring that

SetFocus (Doc. Window.Handle)

You can move the focus to the active document by calling it as shown in .

IJCAD 2016 and later implement the Focus method, so you can set the focus using doc.Window.Focus().


2022-09-30 19:23

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.