Click to See Complete Forum and Search --> : Mouse Trap


Adlakha
July 31st, 2001, 06:00 AM
Hi,
I have a MS FLexgrid on my Form.
I am looking for the code which makes mouse to behave in the same
manner as it works on Windows Platform.
I know how to trap the Right click button and left click and the middle click.
I have "scroll Mouse" so like in ms-excel when you click the scroll button and move
the mouse in any direction the sheet automatically moves in that direction.
I am trying to give the same functionality to my application.

Your help is appreciated. Thanks in Advance.

Deepak Adlakha.

Clearcode
July 31st, 2001, 06:29 AM
You will need to find out what message the scroll mouse sends to your application and then put your code in that.

The handiest way of doing that is to download the EventVB.ocx from http://www.MerrionComputing.com/Download/index.htm , drop the EventWindow control from that OCX on a form and put the following code in that form:


private Sub Form_Load()
VBEventWindow1.ParentForm = me.hWnd
End Sub




and put code to see what messages are sent to your form:

private Sub VBEventWindow1_WindowMessageFired(byval msg as WindowMessages, byval wParam as Long, byval lParam as Long, Cancel as Boolean, ProcRet as Long)

Debug.print msg & " ( " & wParam & " , " & lParam & " )"

End Sub




Hope this helps,
Duncan

-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
Check out the new downloads - ImageMap.ocx is the VB control that emulates an HTML image map, EventVB.OCX for adding new events to your VB form and adding System Tray support simply, MCL Hotkey for implemenmting system-wide hotkeys in your application...all with source code included.