Axapta hWnd

From Axaptapedia

It is easy to find the hWnd (Window handle) of the main Microsoft Axapta MDI parent window.

Using the pre-declared infolog instance, just call the hWnd() method, as shown in the job below.

static void findhWnd(Args _args)
{
    int hWnd;
    ;

    hWnd = infolog.hWnd();
    info (int2str(hWnd));
}

To get the hWnd of an individual form in Axapta, you can use the formRun.hWnd() method. From within the form, simply use element.hWnd().