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

Alternative method for SetFocusToDwgView()?

1 REPLY 1
Reply
Message 1 of 2
dynamicscope
424 Views, 1 Reply

Alternative method for SetFocusToDwgView()?

Unfortunately, ARX 2007 does not provide Autodesk.AutoCAD.Internal.Utils.SetFocusToDwgView().

What would be the best way to mimic this method?

1 REPLY 1
Message 2 of 2

Try this code (not the same as SetFocusToDwgView but can be helpful):

[DllImport("user32.dll")]
extern static IntPtr SetFocus(IntPtr hWnd);
static void SetFocusToActiveDocument()
{
  SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle);
}
static void SetFocusToMainWindow()
{
  SetFocus(Application.MainWindow.Handle);
}

 

 

 

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

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