Author | Topic: Re: Taskbar-size | |
---|---|---|
Andreas Gehrs-Pahl View the complete thread for this message in: | Re: Taskbar-size on Tue, 21 Apr 2015 04:46:15 -0400 Thomas, >When compiling, another function is missing: GetDeskTopSize()... Sorry, I overlooked that one. >Can it be replaced by AppDeskTop():currentsize() ? As a workaround, AppDeskTop():CurrentSize() will work, but this value isn't updated, when the Desktop resolution is changed (by the user). So, using the following function is the preferred method to get the current Desktop size: Function GetDeskTopSize() ************************************************************************* * Used to get the actual, current Desktop Size, as this value is not updated correctly, if the Deskop resolution is changed during program execution, and "AppDektop():CurrentSize() always reports the original settings. See also PDR 109-4244 for details. * ************************************************************************* LOCAL nHWnd := AppDesktop():GetHWnd() LOCAL nWidth := 0 LOCAL nHeight := 0 LOCAL cBuffer := U2Bin(0) + U2Bin(0) + U2Bin(nWidth) + U2Bin(nHeight) DllCall("User32.DLL", DLL_STDCALL, "GetClientRect", nHWnd, @cBuffer) nWidth := Bin2U(substr(cBuffer, 9, 4)) nHeight := Bin2U(substr(cBuffer, 13, 4)) return ({nWidth, nHeight}) Andreas Andreas Gehrs-Pahl Absolute Software, LLC phone: (989) 723-9927 email: Andreas.GP@Charter.net web: http://www.Aerospace-History.net |