0

As a learning exercise (new to VB.Net) I'm looking to re-write an old VB6 database program in VB.NET which displays key cutting permutations for a locksmith. The display uses a number of textboxes which hold a number as well as being color coded. The old program is very keyboard intensive and I would like the user to to perform most of the tedious, repetitious functions using the mouse.

The ideal situation would be to set the focus on to a text box and using the left mouse click to toggle through numbers in accending order zero to nine incrementally (1 number for each click), the right button to toggle back in reverse order and use the mousewheel to toggle the textbox background through 3 sets of colors.

A lot of the detail of the program I can cope with, but I would appreciate some code assistance in capturing mouse clicks and mousewheel movements into a subroutine.
Can anyone help?

regards,

Tony C

2
Contributors
1
Reply
2
Views
11 Years
Discussion Span
Last Post by f1 fan
0

You need the mouseclick event of the textbox. Then from the mouseevent args you can find out which button was pressed( e.button), left - right - or middle and call the method you want from there. You can also find the number of detents the wheel was rotated if it helps your scrolling (e.delta).

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.