I am writing some Automation tests using Teststack white framework (C#, .net) for my WPF application. I want any cursor movement to be frozen while the tests are running. Is there any way to do that?
I already tried
public partial class NativeMethods
{
[DllImport("user32.dll", SetLastError = true)]
public static extern bool BlockInput(bool fBlockIt);
}
but it is not working as my application is not running with Admin rights
I tried NativeMethods.BlockInput(true);
I am getting access denied exception