Solved

Powerbuilder & mouse wheel direction

Posted on 2011-03-08
10
2,174 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 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Suggested Solutions

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

732 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