Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

Unable to Create Hook - SendKeys.Send Widnows 7

$
0
0
Hey,

I have a Framework 1.1 Application that needs to be run in Windows 7. The application uses quiet a few SendKeys.Send, which causes the following error to occur

************** Exception Text **************
System.Security.SecurityException: Unable to create Hook.
at System.Windows.Forms.SendKeys.InstallHook()
at System.Windows.Forms.SendKeys.Send(String keys, Control control, Boolean wait)
at System.Windows.Forms.SendKeys.Send(String keys)


I am trying to find the right method within the application that is triggered by pressing F4 but until then is there a work around this?


Thanks
Rio

Update: I have a keyevent in my main project that when pressed changes the view.

In another referenced object, someone used the Sendkeys.Send function to trigger the event in the main project.

How would I work around this, since they are two separate projects.

Found a Quick Fix but it is not Ideal :P

If I change the User settings in Windows 7 like so :

http://imageshack.us/photo/my-images...aptureznrs.jpg



But I would prefer a better way around this.


EDIT/UPDATE/NEW QUESTION: Does anyone have experience with using UAC in VS 2003?

What is the best way to trigger a keyevent located in a reference project?

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>