[DllImport("user32.dll")]
static extern bool SystemParametersInfo(uint uiAction, uint uiParam,
IntPtr pvParam, uint fWinIni);
None.
None.
Please add some!
Please add some!
// This code works for SPI_GETFOREGROUNDLOCKTIMEOUT, the above signature doesn't. (Ken)
[DllImport("user32.dll", EntryPoint="SystemParametersInfo", SetLastError = true)]
public static extern bool SystemParametersInfoGet(uint action, uint param, ref uint vparam, uint init);
[DllImport("user32.dll", EntryPoint="SystemParametersInfo", SetLastError = true)]
public static extern bool SystemParametersInfoSet(uint action, uint param, uint vparam, uint init);
// get current lock timeout value
uint timeout = 99;
bool retVal = SystemParametersInfoGet(SPI_GETFOREGROUNDLOCKTIMEOUT, 0, ref timeout, 0);
// set current lock timeout value to 0, so focus can be grabbed
SystemParametersInfoSet(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, 0, 0);
Do you know one? Please contribute it!