Mousewheel problems

BlitzPlus Forums/BlitzPlus Programming/Mousewheel problems

Grey Alien(Posted 2005) [#1]
My Logitech cordless optical mousewheel works in Windows and in the BlitzPlus IDE but MouseZ always returns zero and MouseZspeed always returns 0. The outer mouse commands work. Note that I am running in Graphics mode not windowed mode. Any ideas? Spose it could be a driver/Blitz compatibility issue.

regards


Timjo(Posted 2007) [#2]
You could try creating a dummy window (no size or borders etc) , then going into graphics mode - then testing with waitevent(0) for $204
eventdata() returns 1 or -1 depending on direction of wheel movement.. I don't know if this will slow things down in graphics mode or not - I did a quick check and it didn't seem to make any difference on my machine.

Like this:

invisible_window=CreateWindow("",0,0,0,0,0,32)

Graphics ClientWidth(Desktop()),ClientHeight(Desktop()),32,1

Repeat

Cls

id=WaitEvent(0)

If id=$204 Then Text 100,100, EventData() ;just to show eventdata is returning direction value

Flip

Until KeyDown(1)=True Or id=$201 ;escape key pressed or mousebutton clicked

EndGraphics
End

Try and see - .......Timjo.


Timjo(Posted 2007) [#3]
Actually - you don't seem to need the Createwindow bit - I was assuming you needed a window for the waitevent() command to function - but I tested it without and it seems this isn't necessary.
.....Timjo