Results 1 to 5 of 5

Thread: [RESOLVED] Unable to Create Hook - SendKeys.Send Widnows 7

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2013
    Posts
    177

    Resolved [RESOLVED] Unable to Create Hook - SendKeys.Send Widnows 7

    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?
    Last edited by Crzyrio; Jun 5th, 2013 at 09:42 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width