-
Jun 4th, 2013, 02:33 PM
#1
Thread Starter
Addicted Member
[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.
-
Jun 4th, 2013, 04:35 PM
#2
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...
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Jun 4th, 2013, 07:24 PM
#3
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!
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
Jun 5th, 2013, 07:41 AM
#4
Thread Starter
Addicted Member
Re: Unable to Create Hook - SendKeys.Send Widnows 7
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
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
Last edited by Crzyrio; Jun 5th, 2013 at 09:45 AM.
-
Oct 3rd, 2013, 08:28 AM
#5
Registered User
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|