Solved

Powerbuilder & mouse wheel direction

Posted on 2011-03-08
10
2,195 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
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
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 …
Six Sigma Control Plans

726 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