Solved

Powerbuilder & mouse wheel direction

Posted on 2011-03-08
10
2,008 Views
Last Modified: 2013-12-26
I know powerbuilder can detect the mouse wheel though message.number 522, but how can it detect the direction of the mouse wheel??
0
Comment
Question by:wittkieffer
  • 3
  • 2
10 Comments
 
LVL 21

Expert Comment

by:developmentguru
ID: 35887121
I do not have powerbuilder here to experiment with. I would assume that it works much like Windows.  Check out these links:

http://msdn.microsoft.com/en-us/library/ms645614(v=VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms646254(v=vs.85).aspx

The second link shows that the high two bytes of the wparam contain the wheel delta (more about that in the link).  Basically positive means forward and negative means back.
0
 
LVL 14

Expert Comment

by:sandeep_patel
ID: 35888320
For which PB object you are trying to track this?
0
 
LVL 14

Accepted Solution

by:
sandeep_patel earned 250 total points
ID: 35888428
I tried below in datawindow 'other' event and it works


CONSTANT integer LCI_MOUSEWHEEL = 522

IF message.number = LCI_MOUSEWHEEL THEN
      If long( message.wordparm) < 0 Then
            Messagebox('','down')
      Else
            Messagebox('','up')            
      End If
END IF

Regards,
Sandeep
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 21

Expert Comment

by:developmentguru
ID: 35889067
You should, technically, shift the wordparam right 16 in order to get just the high word.  Otherwise information in the low order word may, occasionally, cause that code not to work.
0
 
LVL 14

Expert Comment

by:sandeep_patel
ID: 36105493
I think the solution I provided is working fine for me and it's the correct solution of the problem.

CONSTANT integer LCI_MOUSEWHEEL = 522

IF message.number = LCI_MOUSEWHEEL THEN
      If long( message.wordparm) < 0 Then
            Messagebox('','down')
      Else
            Messagebox('','up')            
      End If
END IF

0
 
LVL 53

Expert Comment

by:Dhaest
ID: 36178695
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now