?
Solved

Powerbuilder & mouse wheel direction

Posted on 2011-03-08
10
Medium Priority
?
2,243 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1000 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
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
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 Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Introduction to Processes

770 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