473,768 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Capturing mouse wheel events

Hi, ALL

Does anybody know how to capture mouse wheel events in C# occured on the
control that natively does not suppot them (e.g. MS Flex Grid)? I have code
hooks windows messages in VB6. I've translated it into C#, but it does not
work :-(

Any another idea?

Thanks
Evgueny
Jul 21 '05 #1
2 6546
Firstly porting from VB6 to C# is not so good, a rewerite is better due to
the fast differences in the two languages ... not sure about the mouse
scroll though... *scratches his head and starts googling*
"Evgeny Zoldin" <ez*****@hotmai l.com> wrote in message
news:Ot******** ******@TK2MSFTN GP11.phx.gbl...
Hi, ALL

Does anybody know how to capture mouse wheel events in C# occured on the
control that natively does not suppot them (e.g. MS Flex Grid)? I have code hooks windows messages in VB6. I've translated it into C#, but it does not
work :-(

Any another idea?

Thanks
Evgueny

Jul 21 '05 #2
OK, I found code from MSDN, use it. It hooks WH_MOUSE hook, I could refine
it and hooked WHEEL event only, but I couldn't define the direction and
"amount" of wheel rotation because standard mouse hook returns pointer to
MOUSEHOOKSTRUCT which does not contait that info... :-(

"Mitchell Geere" <mg****@telkoms a.net> wrote in message
news:e8******** *****@tk2msftng p13.phx.gbl...
Firstly porting from VB6 to C# is not so good, a rewerite is better due to
the fast differences in the two languages ... not sure about the mouse
scroll though... *scratches his head and starts googling*
"Evgeny Zoldin" <ez*****@hotmai l.com> wrote in message
news:Ot******** ******@TK2MSFTN GP11.phx.gbl...
Hi, ALL

Does anybody know how to capture mouse wheel events in C# occured on the
control that natively does not suppot them (e.g. MS Flex Grid)? I have

code
hooks windows messages in VB6. I've translated it into C#, but it does not work :-(

Any another idea?

Thanks
Evgueny


Jul 21 '05 #3

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

Similar topics

3
4690
by: Vikram Bhatia | last post by:
1. Is there an event to capture scrolling using mouse wheel in Netscape 6.x? 2. When arrow keys are used to scroll a page in Netscape 6.x, the scrolling offsets obtained using 'window.pageXOffset' and 'window.pageYOffset' are not correct. Is there any other way to get the correct scrolling offsets?
5
4367
by: Bryan Masephol | last post by:
Hi All I got a datagrid and a ComboBox on a form. I populate the combobox with years for all the data avaiable. When the user chooses a year the datagrid is populated with the specific years information. Problem... when the users scrolls the datagrid with the mouse wheel it work for 2 wheel clicks and then for some reason the focus jumps to the combobox and the year is then changes there for causing the data to change and errors...
2
7511
by: Evgeny Zoldin | last post by:
Hi, ALL Does anybody know how to capture mouse wheel events in C# occured on the control that natively does not suppot them (e.g. MS Flex Grid)? I have code hooks windows messages in VB6. I've translated it into C#, but it does not work :-( Any another idea? Thanks
2
3363
by: Anders Eriksson | last post by:
Hello! I have a program with three views ------------------------------------ | | | | 1 | 2 | | | | | |--------------------------| | | |
0
3166
by: 6tc1 | last post by:
Hi all, I've got a UserControl that contains a few PictureBox objects. If I click on outside of the Picture in the UserControl, the scrolling with the mouse button works - however, no amount of clicking on the PictureBox objects will get that scrolling working. However, after I click on outside of the PictureBox object, then click as many times as I like on the PictureBox the scrolling with the mouse wheel continues to work. I found...
13
2309
by: James Bond | last post by:
Hello. My 80+ year old father has recently decided to get his first computer. Due to his age (and I suspect lack of playing pong as a child like I did) he lacks the manual dexterity to use a mouse well. He is frequently missing the left mouse button and hitting the right, or less often the middle (wheel) buttons. While he is very slowly getting better with practice, the frustration level is high for him as a result of this (he gets very...
5
4746
by: Nick | last post by:
Hey guys, I have 2 events on a windows forms datagrid, the mouse move as well as the double click events. What's happening is that when I double click on a row in the grid, the mouse move event gets triggered and the double click is not identified at all. Is there any way I can invoke the double click when the mouse move also exists?
0
1614
by: Gamey | last post by:
I have an application that NEEDS (don't ask) to handle additional mouse and keyboard processing during DoDragDrop. Normally, DoDragDrop kindly squashes all keyboard and mouse events. Alternate, more specific events, are used in their stead such as DragEnter, DragLeave, DragHover, GiveFeedback, and QueryContinueDrag. None of these give me access to the general state of the keyboard or to mouse events ( in my case I really need the mouse...
14
13815
by: effendi | last post by:
Is it possible for me to disable the wheel scroll in a mouse when user click on a drop-down list? Thanks
0
9407
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
10175
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...
1
9961
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
9843
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
7384
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
6656
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();...
0
5425
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3932
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
2808
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.