473,804 Members | 2,064 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Keyboard Hooking in VB.NET 2003

Hi,

After doing a bit of googling, it seems everyone refers to the article
"Managing Low-Level Keyboard Hooks in VB .NET" Written by Paul Kimmel -
http://www.developer.com/net/net/art...087_2193301_1/

When I implement this in a VB.NET Windows Forms application in Visual Studio
2002, everything works fine - I can hook the keyboard, trap keys, etc.

When I take the same module and place it in my VB.NET Windows Forms
application in Visual Studio 2003, it all falls apart.
I set a breakpoint on the Keyboard Hook, which works fine.
But no matter where I set a breakpoint in the Keytrap, it never seems to get
called, and there's no output as usual in the Output (debug) window.

I've copied the code exactly as written in the article, and also tried
directly copying the code from the known-working VS.NET 2002 project .

Is there something weird going on with my application, or does everyone have
this problem in VS.NET 2003?
Nov 21 '05 #1
1 2619
Anyone able to help with this at all?

"William Hughes" wrote:
Hi,

After doing a bit of googling, it seems everyone refers to the article
"Managing Low-Level Keyboard Hooks in VB .NET" Written by Paul Kimmel -
http://www.developer.com/net/net/art...087_2193301_1/

When I implement this in a VB.NET Windows Forms application in Visual Studio
2002, everything works fine - I can hook the keyboard, trap keys, etc.

When I take the same module and place it in my VB.NET Windows Forms
application in Visual Studio 2003, it all falls apart.
I set a breakpoint on the Keyboard Hook, which works fine.
But no matter where I set a breakpoint in the Keytrap, it never seems to get
called, and there's no output as usual in the Output (debug) window.

I've copied the code exactly as written in the article, and also tried
directly copying the code from the known-working VS.NET 2002 project .

Is there something weird going on with my application, or does everyone have
this problem in VS.NET 2003?

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1588
by: Karthik A. | last post by:
Hi, Is there a way to do keyboard hooking in java, if yes can anyone give me the source code? Thanks Karthik
1
3715
by: Greg Merideth | last post by:
Is there a way via c# to hook a system tray application into the windows keyboard que globally so that when the application is running and you press, say, control-alt-shift-f11 the system tray app could respond to that keypress (much in the way my pgp app encrypts on ctrl-alt-e) even though its minimized and your in a different app? I've got an app thats a system tray and while its easy to access the data I'm just trying to add an extra...
2
1500
by: Fabiano | last post by:
Please, is there a way i can hook the keyboard? I would like to hook everykey. CTRL+ALT+DEL, CTRL+ESC, and all others. The user just press some keys, and none control keys, not only at my app but all windows. A friend told me that there's a non-documented API that let me do this, but he didn't remember the name. Danke.
0
323
by: William Hughes | last post by:
Hi, After doing a bit of googling, it seems everyone refers to the article "Managing Low-Level Keyboard Hooks in VB .NET" Written by Paul Kimmel - http://www.developer.com/net/net/article.php/11087_2193301_1/ When I implement this in a VB.NET Windows Forms application in Visual Studio 2002, everything works fine - I can hook the keyboard, trap keys, etc. When I take the same module and place it in my VB.NET Windows Forms
0
968
by: Willie jan | last post by:
Hi, i created a control that hooks a keyboard to find out if a specific key is pressed. KeyboardHandle = SetWindowsHookEx(WH_KEYBOARD_LL, callback, Marshal.GetHINSTANCE(.GetExecutingAssembly.GetModules()(0)).ToInt32, 0) The problem i have is that more than one instance of this control is running
0
1411
by: BobAchgill | last post by:
When I try to hook a non letter key like left arrow (37) all is OK. If (Hookstruct.vkCode = 37) Or (Hookstruct.vkCode = 83) And CBool(Hookstruct.flags) Then But, for example, the hook for the letter "s" key (83) does not work. Mysteriously, the "s" starts hooking properly after I set and continue through a break point. I can even then remove the breakpoint and the "s" continues to hook OK as long as I have the debug session going.
0
2781
by: learner404 | last post by:
Hello, I have a Windows Pyhon-Tk app which need to capture mouse end keyboard events even when the app is not in focus. On Windows so far I've used the excellent PyHook which does the job perfectly: " The pyHook library wraps the low-level mouse and keyboard hooks in the Windows Hooking API for use in Python applications."
0
3739
by: joemango | last post by:
Hi everyone, I was just reading the following artilce titled: "Spy: A Windows CE API Interceptor" by Dmitri Leman in Dr. Dobbs Journal, September 02, 2003 located at http://www.ddj.com/184405459?pgno=1 the article presents source code that includes a dll file which holds all the hooking procedures it is written in C++. Is there an implementation for windows api hooking in C# or .NET out
9
10991
by: Kbalz | last post by:
I have an application that minimizes itself, and I want it to listen for certain key commands, and when they are pressed, my program can react to them. So far I've gotten my application to react as I intend while the program has focus, but when the application loses focus, the listening stops. I am using VS 2008 beta 2, with .net 3.5.
1
2010
by: adam2009 | last post by:
Hey all, I try to find some code that will log to some txt file all the keystrokes in a smartphone. I have read many blogs about it, but I'm still confused. There are two blogs that i tried to understand 1.http://mikeunderhill.blogspot.com/2005/09/overriding-forms-wndproc-in-net-cf-20.html 2. http://blog.opennetcf.com/ayakhnin/CategoryView,category,Compact%20Framework.aspx
0
9595
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10604
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10354
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10359
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10101
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7643
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6870
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4314
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3005
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.