[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?
Re: Unable to Create Hook - SendKeys.Send Widnows 7
UAC in VS 2003???
UAC didn't exist in 2003 unless i'm mistaken.
Why VB2003? You're 4 versions behind most members in this forum...
Re: Unable to Create Hook - SendKeys.Send Widnows 7
Windows 7 initially shipped with Framework 3.5 if I recall correctly and has since progressed to 4. I'm frankly amazed that anything coded for Framework 1.1 works on W7 at all!
Re: Unable to Create Hook - SendKeys.Send Widnows 7
Quote:
Originally Posted by
.paul.
UAC in VS 2003???
UAC didn't exist in 2003 unless i'm mistaken.
Why VB2003? You're 4 versions behind most members in this forum...
I know but was wondering if there is a way to put it in? We usually do use 2010 or 2012 for development, but this application was created quiet some time back and is fairly large. We would much rather just fix the one bug then have to upgrade the entire project
Quote:
Originally Posted by
dunfiddlin
Windows 7 initially shipped with Framework 3.5 if I recall correctly and has since progressed to 4. I'm frankly amazed that anything coded for Framework 1.1 works on W7 at all!
The application in question is an inhouse application, so we have installed 1.1 on the computers going to use it :P
Right now we are thinking of replacing the Sendkeys.send with Callbacks but I havent had much experience with them
Re: Unable to Create Hook - SendKeys.Send Widnows 7
After installing Framework 1.1 and 1.1 SP1, Find and Install the following packs
1. NET Framework 1.1 Service Pack 1 CLR Security Update for Windows 7
2. Microsoft .NET Framework 1.1 Service Pack 1 Update for using SendKeys under Microsoft Windows 7
the issue "Unable to Create Hook" on windows 7 with Framework 1.1 issue solved