Показать сообщение отдельно
Старый 20.06.2019, 17:23   #6  
Sergey Petrov is offline
Sergey Petrov
Участник
 
80 / 19 (1) ++
Регистрация: 03.04.2007
Адрес: Saint-Petersburg, Russia
Цитата:
Сообщение от Dron AKA andy Посмотреть сообщение
Мы на DAX2012 вот так сделали, для Win7 помогло:
Forms opening up with focus in background

X++:
//Add a new static, client-side method to Classes\Application, as below:
client static void disableWindowGhosting()
{
    DLL DLL;
    DLLFunction DLLFunction;
    container con = WinAPI::getVersion();
    ;
    if (conpeek(con, 1) == 6) //Vista and Win7/Win2008R2 only
    {
        //this will disable window ghosting for this process only, for its lifespan only
        DLL = new DLL('USER32');
        DLLFunction = new DLLFunction(DLL,'DisableProcessWindowsGhosting');
        DLLFunction.call();
    }
}
//Add a call to this from Application.startupPost(), like this:

if (hasGUI())
{
    Application::DisableWindowGhosting();
}
Большое спасибо всем! Будем пробовать последний предложенный вариант.
__________________
MS Dynamics AX 2009

Kernel 5.0.1600.4110
Application 5.0.1500.6491