I have asked a similar question to this before, but have not found a
satisfactory answer yet, so I thought I would ask it in another way.
KeyPreview, for a form, handily allows keys to be intercepted at form level,
and pre-processed and/or filtered. In the absence of a MousePreview setting,
is there a way to do the same thing for mouse movements and clicks?
TIA
Charles 9 8256
hi Charles
can u be more clear. That is what actually is ur requirement. whether you wanted to do something on your mouse move or stuffs like that
With regards
Sadha Sivam S
AFAIK, the only way to do a mousepreview kind of stuff is to use a System Hook.
This KB may help http://support.microsoft.com/default...;EN-US;Q319524
Rgds,
Anand
VB.NET MVP http://www.dotnetindia.com
"Charles Law" wrote: I have asked a similar question to this before, but have not found a satisfactory answer yet, so I thought I would ask it in another way.
KeyPreview, for a form, handily allows keys to be intercepted at form level, and pre-processed and/or filtered. In the absence of a MousePreview setting, is there a way to do the same thing for mouse movements and clicks?
TIA
Charles
Hi Sadha
I want to handle mouse move events and clicks in a user control, so that
they do not reach any of the controls placed on the user control. So,
suppose I have a user control with a button on it, if the user clicks where
the button is I want to be able to intercept the click and use it to draw a
selection border around the button, rather than call the button's click
event.
Charles
"sadha sivam" <sa************@yahoo.com> wrote in message
news:E7**********************************@microsof t.com... hi Charles,
can u be more clear. That is what actually is ur requirement. whether you
wanted to do something on your mouse move or stuffs like that. With regards,
Sadha Sivam S
Hi Anand
Thanks for the link. It looks like it will do just what I want.
Cheers
Charles
"Anand[MVP}" <An******@discussions.microsoft.com> wrote in message
news:DE**********************************@microsof t.com... AFAIK, the only way to do a mousepreview kind of stuff is to use a System
Hook. This KB may help
http://support.microsoft.com/default...;EN-US;Q319524 Rgds, Anand VB.NET MVP http://www.dotnetindia.com
"Charles Law" wrote:
I have asked a similar question to this before, but have not found a satisfactory answer yet, so I thought I would ask it in another way.
KeyPreview, for a form, handily allows keys to be intercepted at form
level, and pre-processed and/or filtered. In the absence of a MousePreview
setting, is there a way to do the same thing for mouse movements and clicks?
TIA
Charles
Hi Anand
I've now had chance to try using a system hook, as described in the article,
but there is a problem. When I insert a hook for an MDI child form, the hook
applies for the entire application, and not just for the child form. I am
effectively getting a preview of mouse events for all forms, and not just
the current form. In this way the effect is different from KeyPreview, which
operates at form level.
Any thoughts?
Charles
"Anand[MVP}" <An******@discussions.microsoft.com> wrote in message
news:DE**********************************@microsof t.com... AFAIK, the only way to do a mousepreview kind of stuff is to use a System
Hook. This KB may help
http://support.microsoft.com/default...;EN-US;Q319524 Rgds, Anand VB.NET MVP http://www.dotnetindia.com
"Charles Law" wrote:
I have asked a similar question to this before, but have not found a satisfactory answer yet, so I thought I would ask it in another way.
KeyPreview, for a form, handily allows keys to be intercepted at form
level, and pre-processed and/or filtered. In the absence of a MousePreview
setting, is there a way to do the same thing for mouse movements and clicks?
TIA
Charles
AFAIK a hook is specific to a single thread not a window. One thing you can see if look at the hwnd you recieve and handle events that are specific to your window only. Or if each windows is in a seperate thread, then you can hook into events of that thread alone.
Rgds,
Anand
VB.NET MVP http://www.dotnetindia.com
"Charles Law" wrote: Hi Anand
I've now had chance to try using a system hook, as described in the article, but there is a problem. When I insert a hook for an MDI child form, the hook applies for the entire application, and not just for the child form. I am effectively getting a preview of mouse events for all forms, and not just the current form. In this way the effect is different from KeyPreview, which operates at form level.
Any thoughts?
Charles
"Anand[MVP}" <An******@discussions.microsoft.com> wrote in message news:DE**********************************@microsof t.com... AFAIK, the only way to do a mousepreview kind of stuff is to use a System Hook. This KB may help
http://support.microsoft.com/default...;EN-US;Q319524 Rgds, Anand VB.NET MVP http://www.dotnetindia.com
"Charles Law" wrote:
I have asked a similar question to this before, but have not found a satisfactory answer yet, so I thought I would ask it in another way.
KeyPreview, for a form, handily allows keys to be intercepted at form level, and pre-processed and/or filtered. In the absence of a MousePreview setting, is there a way to do the same thing for mouse movements and clicks?
TIA
Charles
Thanks for the ideas Anand.
Do you know if, having hooked the mouse messages, I can change the message
or redirect it to another window? I can't see anywhere where it says whether
I can modify the MOUSEHOOKSTRUCT structure.
Charles
"Anand[MVP}" <An******@discussions.microsoft.com> wrote in message
news:96**********************************@microsof t.com... AFAIK a hook is specific to a single thread not a window. One thing you
can see if look at the hwnd you recieve and handle events that are specific
to your window only. Or if each windows is in a seperate thread, then you
can hook into events of that thread alone. Rgds, Anand VB.NET MVP http://www.dotnetindia.com
"Charles Law" wrote:
Hi Anand
I've now had chance to try using a system hook, as described in the
article, but there is a problem. When I insert a hook for an MDI child form, the
hook applies for the entire application, and not just for the child form. I
am effectively getting a preview of mouse events for all forms, and not
just the current form. In this way the effect is different from KeyPreview,
which operates at form level.
Any thoughts?
Charles
"Anand[MVP}" <An******@discussions.microsoft.com> wrote in message news:DE**********************************@microsof t.com... AFAIK, the only way to do a mousepreview kind of stuff is to use a
System Hook. This KB may help
http://support.microsoft.com/default...;EN-US;Q319524 Rgds, Anand VB.NET MVP http://www.dotnetindia.com
"Charles Law" wrote:
> I have asked a similar question to this before, but have not found a > satisfactory answer yet, so I thought I would ask it in another way. > > KeyPreview, for a form, handily allows keys to be intercepted at
form level, > and pre-processed and/or filtered. In the absence of a MousePreview setting, > is there a way to do the same thing for mouse movements and clicks? > > TIA > > Charles > > >
I am not sure if you can do that.. You can supress calling the next in chain, due to which that message can be supressed. But I am not sure if you can chage the data, but you can always try..
Rgds,
Anand
VB.NET MVP http://www.dotnetindia.com
"Charles Law" wrote: Thanks for the ideas Anand.
Do you know if, having hooked the mouse messages, I can change the message or redirect it to another window? I can't see anywhere where it says whether I can modify the MOUSEHOOKSTRUCT structure.
Charles
"Anand[MVP}" <An******@discussions.microsoft.com> wrote in message news:96**********************************@microsof t.com... AFAIK a hook is specific to a single thread not a window. One thing you can see if look at the hwnd you recieve and handle events that are specific to your window only. Or if each windows is in a seperate thread, then you can hook into events of that thread alone. Rgds, Anand VB.NET MVP http://www.dotnetindia.com
"Charles Law" wrote:
Hi Anand
I've now had chance to try using a system hook, as described in the article, but there is a problem. When I insert a hook for an MDI child form, the hook applies for the entire application, and not just for the child form. I am effectively getting a preview of mouse events for all forms, and not just the current form. In this way the effect is different from KeyPreview, which operates at form level.
Any thoughts?
Charles
"Anand[MVP}" <An******@discussions.microsoft.com> wrote in message news:DE**********************************@microsof t.com... > AFAIK, the only way to do a mousepreview kind of stuff is to use a System Hook. > > This KB may help http://support.microsoft.com/default...;EN-US;Q319524 > > Rgds, > Anand > VB.NET MVP > http://www.dotnetindia.com > > "Charles Law" wrote: > > > I have asked a similar question to this before, but have not found a > > satisfactory answer yet, so I thought I would ask it in another way. > > > > KeyPreview, for a form, handily allows keys to be intercepted at form level, > > and pre-processed and/or filtered. In the absence of a MousePreview setting, > > is there a way to do the same thing for mouse movements and clicks? > > > > TIA > > > > Charles > > > > > >
Good thinking. I had concluded that I could not change the window handle as
initial attempts proved fruitless.
Thanks.
Charles
"Whatshisname" <an*******@discussions.microsoft.com> wrote in message
news:BA**********************************@microsof t.com... Charles, you can redirect a message to another window and change it if you
like. Use the API's SendMessage or PostMessage. You can just ignore the
caught message and then create your own message and send it to the window of
your choice. ----- Charles Law wrote: -----
Thanks for the ideas Anand.
Do you know if, having hooked the mouse messages, I can change the
message or redirect it to another window? I can't see anywhere where it says
whether I can modify the MOUSEHOOKSTRUCT structure.
Charles
"Anand[MVP}" <An******@discussions.microsoft.com> wrote in message news:96**********************************@microsof t.com... > AFAIK a hook is specific to a single thread not a window. One thing
you can see if look at the hwnd you recieve and handle events that are
specific to your window only. Or if each windows is in a seperate thread, then
you can hook into events of that thread alone. >> Rgds, > Anand > VB.NET MVP > http://www.dotnetindia.com >> "Charles Law" wrote: >>> Hi Anand >>>> I've now had chance to try using a system hook, as described in
the article, >> but there is a problem. When I insert a hook for an MDI child
form, the hook >> applies for the entire application, and not just for the child
form. I am >> effectively getting a preview of mouse events for all forms, and
not just >> the current form. In this way the effect is different from
KeyPreview, which >> operates at form level. >>>> Any thoughts? >>>> Charles >>>>>> "Anand[MVP}" <An******@discussions.microsoft.com> wrote in
message >> news:DE**********************************@microsof t.com... >>> AFAIK, the only way to do a mousepreview kind of stuff is to use
a System >> Hook. >>>>>> This KB may help >> http://support.microsoft.com/default...;EN-US;Q319524 >>>>>> Rgds, >>> Anand >>> VB.NET MVP >>> http://www.dotnetindia.com >>>>>> "Charles Law" wrote: >>>>>>> I have asked a similar question to this before, but have not
found a >>>> satisfactory answer yet, so I thought I would ask it in another
way. >>>>>>>> KeyPreview, for a form, handily allows keys to be
intercepted at form >> level, >>>> and pre-processed and/or filtered. In the absence of a
MousePreview >> setting, >>>> is there a way to do the same thing for mouse movements and
clicks? >>>>>>>> TIA >>>>>>>> Charles >>>>>>>>>>>>>>>>>> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Erik |
last post by:
Hi,
I want to make an effect like in excel when you fix colums and then
you can scroll the rest colums behind the fixed.
But I won't or can't do this with frames, so has anybody seen a...
|
by: Luke Skywalker |
last post by:
Hi guys,
I have to simulate the removing of a file in Windows with Javascript: in
other words I drag an image above a layer and the image disappears (like the
recycle bin).
I know (or better I...
|
by: Bob Alston |
last post by:
I need to produce a report like this
Color: # %
------ --- ---
White 10 20
Black 25 50
other 15 30
---- ----
Total 50 100
|
by: dgs |
last post by:
How to produce a tooltip ?
Like one we have in VB as elements attribute.
Is there any function for it ?
|
by: Maximiliano |
last post by:
Is there any way to handle a fade effect like script.aculo.us but on
the server side?.
I mean a call a fade effect and i want to know when it finished to
raise another server method?
I need this...
|
by: AndrewC |
last post by:
I am using the Scriptaculous/Prototype libraries to build a project
and I really want to have an effect like the mootools download page
(http://www.mootools.net/download) where when you mouse over...
|
by: |
last post by:
Hi,
I would like to have effect like this on my page:
When I click the button, the div is showing up and growing to his size
(barging other elements).
When I click the button second time, div...
|
by: grandong |
last post by:
i want to create custom start menu, i use win7, currently i stuck with create form that look like right side of start menu (also like taskbar, or form caption, something with glass effect), and...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
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,...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |