locked
SystemParametersInfo hangs RRS feed

  • Question

  • I see delay in the return to call from SystemParametersInfo when I set Menu Font size as:

    bResult = SystemParametersInfo(SPI_SETNONCLIENTMETRICS, paramMetrics.cbSize, ref paramMetrics, 0);

    I do not understand what is causing the delay in returning from the call. As I set the last parameter to 0, msdn help mentioned if does not broadcast the Wm_SETTINGCHANGE message. Any insight on the cause of the issue is appreciated.

    Thanks.

    Tuesday, November 11, 2008 12:11 AM

Answers

  • You are using P/Invoke in a C# program.  Are you sure all your declarations are correct?  Did you use SPI_GETNON*** to initialize paramMetrics correctly?  Do the values look good when you look at them with the debugger?
    Hans Passant.
    • Marked as answer by jack 321 Friday, November 14, 2008 2:37 AM
    Tuesday, November 11, 2008 1:04 AM