|
-
Feb 1st, 2004, 07:15 PM
#1
Thread Starter
Hyperactive Member
[solved] how to do global mouse hook in VB .NET?
Looks like .NET does not support global system hook. I got an example of system wide disable mouse: http://www.devcity.net/forums/faq.as...15&cat=Windows, it works in XP Pro. However, if I only disable some of the mouse event, i.e. LButtomUp and LButtonDown only, then sometimes I got error. What's the difference between disable all mouse events and some of them? Anyone has a better way to do this in VB .NET?
I'm doing a program in VB6 which runs great, however, I want to change it to VB .NET, then I found MS VB .NET does not support global mouse hook, what should I do now? Stay at VB6?
thanks.
Last edited by temp_12000; Feb 2nd, 2004 at 01:38 PM.
-
Feb 1st, 2004, 07:19 PM
#2
Frenzied Member
-
Feb 2nd, 2004, 12:04 PM
#3
Addicted Member
Re: how to do global mouse hook in VB .NET?
Originally posted by temp_12000
Looks like .NET does not support global system hook. I got an example of system wide disable mouse: http://www.devcity.net/forums/faq.as...15&cat=Windows, it works in XP Pro. However, if I only disable some of the mouse event, i.e. LButtomUp and LButtonDown only, then sometimes I got error. What's the difference between disable all mouse events and some of them? Anyone has a better way to do this in VB .NET?
I'm doing a program in VB6 which runs great, however, I want to change it to VB .NET, then I found MS VB .NET does not support global mouse hook, what should I do now? Stay at VB6?
thanks.
It turns out that it can be done. Here is an article a fellow wrote on how to do it.
http://groups.google.com/groups?q=vi...zum.com&rnum=2
-
Feb 2nd, 2004, 01:37 PM
#4
Thread Starter
Hyperactive Member
[solved] Re: how to do global mouse hook in VB .NET?
thank you very much, in my quick tests, both keyboard & mouse work, no error.
-
Feb 3rd, 2004, 12:21 AM
#5
Thread Starter
Hyperactive Member
Re: Re: how to do global mouse hook in VB .NET?
it can get the hook, however, if directinput is used for reading mouse event, the hook can not trap it.
-
Feb 3rd, 2004, 04:15 AM
#6
Also the WH_MOUSE_LL hook works on Windows NT, 2000, XP and 2003 only - it is not in Windows 95, 98 and Me.
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
|