Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
925
SendKeys does not work on x64 Windows7 machine with UAC when built under Debug|x86
posted

I want an UltraGrid cell that allows only uppercase chars and the hyphen char.

I achieved this by using the SendKeys.Send approach detailed in the Help.

This worked until I built and run my application in Debug|x86 on an x64 Windows7 machine with UAC turned on. On this machine the keypresses are just suppressed and the SendKeys.Send seems to have no effect.

If I disable UAC it works, if I change to Debug|Any CPU it works. Also a colleague with the same setup apart from an x86 Windows 7 does not seem to have the same issue whether he builds under x86 or Any CPU. If he runs the application built on my machine it works fine on his machine (but not on mine). If I run his build (Debug|x86) it does not work.

The problem seems to occur when application is built targetting x86 and then run on an x64 Windows7 machine with UAC on.

From what I gather SendKeys.Send is somewhat restricted by UAC in Windows 7 and is discouraged, so is there an alternative way to achieve what I want?