In our C# application we use the RDP viewer as an ActiveX control. The application has its own toolbar with a Ctrl+Alt+Del button. There does not seem to be a method on the ActiveX control to perform this function. I know you can hit Ctrl+Alt+End on your keyboard which is fine but how do I do that from the toolbar button click?
+1
A:
Try to use the SendKeys class.
In this example, you could send Ctrl+Alt+End as this:
SendKeys.Send("(^%{END})");
Magnus Johansson
2009-05-22 10:15:37
The problem with SendKeys is that is does not work correctly under vista UAC. .NET 3 runtime addresses this but I am tied to .NET 2 right now. See SendKeys MSDN docs for further information.
Kevin
2009-05-22 11:46:25
Weel, then you probably only have 2 choices. Either upgrade to .NET v3.5 (good) or disable UAC (bad).
Magnus Johansson
2009-05-26 07:16:53
don't you dare disable UAC :) seriously, what you're seeing with SendKeys is totally by design. @Magnus is correct, upgrade to 3.5
Michael Howard-MSFT
2010-04-13 21:19:57