Mouse Wheel Rotation:
This will scroll a page as defined according to the mouse wheel rotation. A method which can be useful if you have not object scroll.
Helps?
This will scroll a page as defined according to the mouse wheel rotation. A method which can be useful if you have not object scroll.
Code:
Extern.Declare micVoid, "mouse_event", "user32.dll", "mouse_event", micLong, micLong, micLong, micLong, micLong
Const MOUSEEVENTF_WHEEL = 2048 '@const long | MOUSEEVENTF_WHEEL | middle button up
Const POSWHEEL_DELTA = 120 '@const long | POSWHEEL_DELTA | movement of 1 mousewheel click Down<nl>
Const NEGWHEEL_DELTA = -120 '@const long | NEGWHEEL_DELTA | movement of 1 mousewheel click Up<nl>
'*****************************************************'*
' ** Max: MouseWheelRot(5); Min : MouseWheelRot(-5)
'* positive and negative clicks exist, negative rotates wheel up: positive down
'*****************************************************
Sub MouseWheelRot(iClicks)
dim iLoop
dim bPos
if iClicks > 0 then
bPos = true
end if
for iLoop = 1 to abs(iClicks)
if bPos then
Extern.mouse_event MOUSEEVENTF_WHEEL,0,0,POSWHEEL_DELTA,0
else
Extern.mouse_event MOUSEEVENTF_WHEEL,0,0,NEGWHEEL_DELTA,0
end if
next
End Sub
Helps?
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.