Put the following code in the GLOBAL class in a new method called setFormModal : static void setFormModal(int _thisHWND, boolean _bModal) { DLL _winApiDLL; DLLFunction _EnabledWindow; DLLFunction _getTop; DLLFunction _getNext; DLLFunction _getParent; void local_enableWHND(int _lHWND) { int lnextWnd; lnextWnd = _getTop.call(_getParent.call(_lHWND)); while (lnextWnd) { if (lnextWnd != _lHWND) enabledWindow.call(lnextWnd, (!_bModal)); lnextWnd = _getNext.call(lnextWnd, 2); } } ; _winApiDLL = new DLL('user32'); _getNext = new DLLFunction(_winApiDLL,"GetWindow"); _EnabledWindow = new DLLFunction(_winApiDLL,"EnableWindow"); _getTop = new DLLFunction(_winApiDLL,"GetTopWindow"); _getParent = new DLLFunction(_winApiDLL,"GetParent"); _getParent.returns(ExtTypes:: DWORD); _getParent.arg(ExtTypes:: DWORD);
My thoughts on Dynamics AX application development. I have been working as a consultant with Microsoft ERP-technology since 1994. Currently I work at Optimate A/S. My main focus is customization and application development. This blog is merely my place to put stuff that I want to remember. If anybody can benefit from reading this, that's great :0). Feel free to use any code snippets posted - but accept that you do this at your own risk!!!