Tuesday 15 May 2012

x++ - AlwaysOnTop property not behaving properly -


For any reason, the AlwaysOnTop feature is not working properly for the design of a form.

References here: We are trying to create a form that stays on every other when it is opened. Not simple? Apart from this, we do not want to set a popup to windytip according to my best, for any other reason (if you have any ideas, please let me know).

So my question is, is there a parameter / security feature that at any time bans the form at any time?

Even the setting of WinApi is also the form's HWD

What I have done to solve it, by creating a form model through WinAPI, the code below There is a copy from a saved text, so it may need to be polished. (Also keep in mind that it can not work as AX-2009.)
  zero setformmodel (int_ethis hwnd, boolean_bomodel) {DLL _winApiDLL; DLLFunction _EnabledWindow; DLLFunction _getTop; DLL function _getNext; DLLFunction _getParent; Zero Local_AbbHandD (atlhwnd) {int lanxwand; LnextWnd = _getTop.call (_getParentCall (_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 DLL function (_winApiDLL, "GetTopWindow"); _getParent = New DLL function (_winApiDLL, "GetParent"); _getParent.returns (ExtTypes :: DWORD); _getParent.arg (ExtTypes :: DWORD); _EnabledWindow.returns (ExtTypes :: DWORD); _EnabledWindow.arg (ExtTypes :: DWORD, ExtTypes :: DWORD); _getTop.returns (ExtTypes :: DWORD); _getTop.arg (ExtTypes :: DWORD); _getNext.returns (ExtTypes :: DWORD); _getNext.arg (ExtTypes :: DWORD, ExtTypes :: DWORD); Local_enableWHND (_thisHWND); Local_enableWHND (_getParent.call (_thisHWND)); }    

No comments:

Post a Comment