Solved

Powerbuilder & mouse wheel direction

Posted on 2011-03-08
10
2,146 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
Independent Software Vendors: 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

680 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