Помнится, давным-давно был описан косяк 2009-й, касающийся перерисовки окна клиента при длительных операциях:
Цитата:
Сообщение от
mazzy
1. ax2009 (проверялись беты, релиз и sp1)
2. windows vista business sp1 (проверялось и без sp1)
3. выполняется какой-нибудь длительный процесс (например, обновление перекрестных ссылок)
4. некоторое время окно с прогресс-баром обновляется нормально
5. потом окно замирает, принимает характерный "сжатый" вид (см. скриншот) и больше не обновляется (не перерисовывается)
Как вариант, окно может "покрываться пеленой" и также переставать отрисовываться. Совершенно случайно было, кажется, найдено решение этой проблемы в блоге
EMEA Dynamics AX Support:
Цитата:
One reason for running into this issue can be if the Windows Operating System is replacing the Dynamics AX application window by a ghost window. When Dynamics AX starts a lengthy COM operation, it is not responding to messages sent by the Windows Operating System in time. So Windows supposes Dynamics AX has stopped responding. When this happens the Dynamics AX application window is replaced by a ghost window until Dynamics AX resumes. Window ghosting is a nice feature that allows the user to minimize, move or close the main window even if the application is not responding. You can easily identify a ghost window as it shows (Not responding) in the window title. Unfortunately the replacement of the Dynamics AX application window by the ghost window can interfere the COM operation and result in the above error message.
Да, на первый взгляд может показаться, что эта тема скорее ближе к обсуждениям вроде
Ошибка времени выполнения в ComExcelDocument_RU.findRange(), но из моего скромного опыта описанное в блоге - лишь одна из возможных причин, и отключение Windows Ghosting не решает проблему взаимодействия с COM-объектами полностью, а вот перерисовку лечит!

Собственно, кроме предлагаемого в блоге запуска клиента AX 2009 в режиме совместимости с WinXP SP2 схожего эффекта можно добиться средствами приложения - добавить новый метод в класс WinAPI
X++:
/// <summary>
/// Call user32.DisableProcessWindowsGhosting
/// </summary>
/// <remarks>
/// Disables the window ghosting feature for the calling GUI process. Window ghosting is a Windows Manager feature
/// that lets the user minimize, move, or close the main window of an application that is not responding.
/// </remarks>
public static client void disableProcessWindowsGhosting()
{
DLL dll = new DLL( #UserDLL );
DLLFunction dllFunc = new DLLFunction( dll, @"DisableProcessWindowsGhosting" );
;
dllFunc.returns( ExtTypes::void );
dllFunc.arg();
dllFunc.call();
}
и добавить вызов этого метода, скажем, в info.startupPost():
X++:
/*
No SYS code must exist in this method
*/
void startupPost()
{
if (clientKind() == ClientType::Client)
{
// BP deviation documented
WinAPI::disableProcessWindowsGhosting();
}
}
Как минимум в ядре WinXP SP3 и Windows Server 2003 SP2 функция DisableProcessWindowsGhosting() есть, так что приведенный код можно использовать относительно безопасно в тех случаях, когда клиент AX 2009 запускается на WinXP и выше.