×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Mouse Wheel at Runtime

Mouse Wheel at Runtime

Mouse Wheel at Runtime

(OP)
I just noticed an odd behavior in my mouse and VFP. I have several grids on a form. When I am working in development mode (i.e. I'm running the app within VFP), the mouse wheel works as expected. (If I am over a grid, and I move the mouse wheel, the grid moves along with it, up and down). But if I run it as an .EXE the mouse wheel does nothing.
Any idea what causes this, and how to fix it? Anyone else have this same issue?

Ver: VFP 9 with all the SPs applied, Sedna applied, on Win10.

Best Regards,
Scott
MSc ISM, MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS

"I try to be nice, but sometimes my mouth doesn't cooperate."

RE: Mouse Wheel at Runtime

Hi,
The corresponding grid or one of its controls needs focus - just click on it
hth
MarK

RE: Mouse Wheel at Runtime

(OP)
Nope, that doesn't work.
And MouseEnter is all that's needed to tell the object that a mouse event is taking place.

Best Regards,
Scott
MSc ISM, MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS

"I try to be nice, but sometimes my mouth doesn't cooperate."

RE: Mouse Wheel at Runtime

Most controls react to mouse wheel, if you just hover them, even whole applications like notpad don't need to be activated before reacting to wheel events, it's sufficient you hover them.

But indeed VFP grids need to have focus before they react to mouse wheel events, also at design time.

Do you prevent focus to be on any column control? If you make use of AllowCellSelection=.f. instead of RETURN .F. in When events, the grid can get (readonly) focus and you can scroll it.

I don't see a difference between running in an EXE or within IDE, in form designer grids won't scroll, as they don't show data at all.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: Mouse Wheel at Runtime

(OP)
This is another that is really bugging me, because everything you guys have said makes sense, but its still not working.
In fact, if I click the record in the gird to make sure the grid is not just in focus, but I've click on a row, and then try to move it with mouse wheel, it still does not move in the .EXE. I can only move it with the vertical scroll bar at the right (either clicking in the bar, or clicking the arrows at the end of the bar, but mouse wheel doesn't work when I'm over the bar either).
I'm beginning to think it is some kind of issue with drivers or the mouse I'm using, but that seems unlikely because it works when in the IDE...

Best Regards,
Scott
MSc ISM, MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS

"I try to be nice, but sometimes my mouth doesn't cooperate."

RE: Mouse Wheel at Runtime

(OP)
BTW, I've resolved the need to click a grid to get the mouse wheel to work by just hovering with this code:

CODE

LPARAMETERS nButton, nShift, nXCoord, nYCoord
*
IF UPPER(ALLTRIM(WONTOP())) = UPPER(ALLTRIM(ThisForm.Name))
	This.SetFocus()
ENDIF 

I've commented this out to see if this was an issue with the run time, but even when I click in the grid at runtime, mouse wheel is still not recognized. While running as an APP in the IDE, it works fine...

Best Regards,
Scott
MSc ISM, MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS

"I try to be nice, but sometimes my mouth doesn't cooperate."

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close