473,503 Members | 6,385 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mouse Wheel

Hello!

I have a program with three views

------------------------------------
| | |
| 1 | 2 |
| | |
| |--------------------------|
| | |
| | 3 |
| | |
| | |
-------------------------------------

view 1 contains a TreeControl
view 2 contains a Listcontrol
View 3 contains a html-control

I want each control to react to the mouse wheel just by having the mouse
cursor in the control. At the moment I need to activate the control for the
mouse wheel to work.

How do I do this??

// Anders
Nov 16 '05 #1
2 3344
Hi,

If I understand correctly you want that the action occur on the control
over which the mouse is located, what happen is that the event is sent to
the control with focus, if you want to change this you will have to redirect
the event to the correct control by checking over what control the mouse is
located , you can use the MouseEnter and MouseLeave events on each control
to know when the mouse is over them, you could have a member variable which
indicate the correct control, then use the same mousewheel handler for the
three controls, in this method you will have the correct control in the
member variable and you can do whatever you want.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Anders Eriksson" <an*************@morateknikutveckling.se> wrote in message
news:1t***************@morateknikutveckling.se...
Hello!

I have a program with three views

------------------------------------
| | |
| 1 | 2 |
| | |
| |--------------------------|
| | |
| | 3 |
| | |
| | |
-------------------------------------

view 1 contains a TreeControl
view 2 contains a Listcontrol
View 3 contains a html-control

I want each control to react to the mouse wheel just by having the mouse
cursor in the control. At the moment I need to activate the control for the mouse wheel to work.

How do I do this??

// Anders

Nov 16 '05 #2
CKa
Hi.

I tried to use the same tip you gave Anders here but got stuck. I created a
member variable that now identifies correctly over which control the mouse
is. I also wired the mousewheel event of each of my controls to use the same
eventhandler method.

This is where I got stuck now. How do I now redirect the mousewheel event
forward to one of my controls? The controls I have are treeview, listview,
listbox and a textbox. I want the mousewheel event to have the same effect
on the controls as they had before I interrupted the mousewheel event.

Hope my message makes sense.

Best regards.

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,

If I understand correctly you want that the action occur on the control
over which the mouse is located, what happen is that the event is sent to
the control with focus, if you want to change this you will have to redirect the event to the correct control by checking over what control the mouse is located , you can use the MouseEnter and MouseLeave events on each control
to know when the mouse is over them, you could have a member variable which indicate the correct control, then use the same mousewheel handler for the
three controls, in this method you will have the correct control in the
member variable and you can do whatever you want.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Anders Eriksson" <an*************@morateknikutveckling.se> wrote in message news:1t***************@morateknikutveckling.se...
Hello!

I have a program with three views

------------------------------------
| | |
| 1 | 2 |
| | |
| |--------------------------|
| | |
| | 3 |
| | |
| | |
-------------------------------------

view 1 contains a TreeControl
view 2 contains a Listcontrol
View 3 contains a html-control

I want each control to react to the mouse wheel just by having the mouse
cursor in the control. At the moment I need to activate the control for

the
mouse wheel to work.

How do I do this??

// Anders


Nov 16 '05 #3

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

Similar topics

6
6180
by: AccessWhiz | last post by:
I have been trying desperately for the past few days to figure out why the MouseWheel solution that I retrieved from the Lebans website won't work. The access database included with the solution...
1
3400
by: jv | last post by:
I have quite a few of continuous form and subform where I do allow scroll bars. I run into problems with the mouse wheel whenever the data on the form does not take up the whole page. In this...
6
2720
by: Susan Bricker | last post by:
Hi. Does anyone have a clue why my mouse wheel stopped working while I was working on the VB behind a form in MS/Access? I would swear that the mouse wheel was working a short time ago. I've...
13
2779
by: Nathan | last post by:
Hi, Can someone lead me to info on detecting and using the mouse button? All I can find in the MSDN docs is that you use e.Delta, but it doesn't explain in how. I tried detecting the roll of...
4
2710
by: ML | last post by:
I am trying to use the mouse wheel event on a numeric input box to allow the use to scroll to inc/dec the value by 1. The issue I am having is that the delta value returned seems to be off. From...
7
1859
by: tommaso.gastaldi | last post by:
This is a curious question. I'd like to know your opinion. I am attaching a drawing resize to a mouse wheel event. Frankly, to me was most natural that, if I mouse wheel UP, the shape gets...
7
2971
by: Martijn Mulder | last post by:
When the mouse is over a picture, the user can grow or shrink it by rolling the central mouse wheel. What behavior is typical when the user rolls the wheel away. Will the picture grow or shrink...
1
3193
by: kallol | last post by:
I have a simple HTML page where I have a form with in a <div style="height: 600px; width: 100%; overflow: auto;">. The mentioned div styles are mandatory to get the expected behavior of the div. ...
3
3018
by: killbill123 | last post by:
Hi, I want to count the mouse wheel rotations in javascript. I searched on google and only found that how to track delta -1 and +1 base on the up mouse wheel and down mouse wheel. I want how...
3
1860
by: West55 | last post by:
I have an Access 2003 database I developed for one of my departments. I have been using Stephen Lebans' MouseWheelOnOff system to turn off the Mouse Wheel without any issues since I developed the...
0
7194
marktang
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,...
1
6976
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...
0
7449
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...
0
5566
agi2029
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,...
1
4993
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...
0
4666
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...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
372
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...

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.