Quantcast
Viewing all articles
Browse latest Browse all 10657

AX 2012: Forms on opening hide behind in the back - 2° part

Hi Guys

About this topic the Microsoft workaround in some case doesn't helped me.
So, below you can find the code that definitely fix the issue!

Modify the StartupPost method of the Application Class and add these two lines:

if (hasGUI())
        Application::DisableWindowGhosting();


Lastly, created the "DisableWindowGhosting" static method like this:

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();
    }
}

That's it!

Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 10657

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>