Пример #1
0
        public static NONCLIENTMETRICS SystemParameterInfo_GetNONCLIENTMETRICS()
        {
            NONCLIENTMETRICS nonclientmetrics = Utility.IsOSVistaOrNewer ? NONCLIENTMETRICS.VistaMetricsStruct : NONCLIENTMETRICS.XPMetricsStruct;

            if (!NativeMethods._SystemParametersInfo_NONCLIENTMETRICS(SPI.GETNONCLIENTMETRICS, nonclientmetrics.cbSize, ref nonclientmetrics, SPIF.None))
            {
                HRESULT.ThrowLastError();
            }
            return(nonclientmetrics);
        }
Пример #2
0
        public static NONCLIENTMETRICS SystemParameterInfo_GetNONCLIENTMETRICS()
        {
            NONCLIENTMETRICS nONCLIENTMETRIC = (Utility.IsOSVistaOrNewer ? NONCLIENTMETRICS.VistaMetricsStruct : NONCLIENTMETRICS.XPMetricsStruct);

            if (!Standard.NativeMethods.SystemParametersInfoW_1(SPI.GETNONCLIENTMETRICS, nONCLIENTMETRIC.cbSize, ref nONCLIENTMETRIC, SPIF.None))
            {
                HRESULT.ThrowLastError();
            }
            return(nONCLIENTMETRIC);
        }
Пример #3
0
 private static extern bool _SystemParametersInfo_NONCLIENTMETRICS(SPI uiAction, int uiParam, [In][Out] ref NONCLIENTMETRICS pvParam, SPIF fWinIni);