1. Jeong Hwan Jang
  2. PowerBuilder
  3. Monday, 15 May 2023 07:16 AM UTC

Hi, everyone.

 

I made a user object has 3 datawindows are aranged vertically. (Powerbuilder 2019 R3)

And I checked VScrollBar property of the user object to show vscrollbar.

But, I have to click the vscrollbar several times to move the bottom datawindow.

This is not comfortable,  I want to move quickly with using mouse wheel.

So, I wrote scripts in 'other event' of user object as below, but it is not working.

Is there any problem in this script?
----------------------------------------------------------------------------

CONSTANT integer WM_MOUSEWHEEL = 522

IF message.number= WM_MOUSEWHEEL THEN
    message.processed = true

    if wparam/10000000 > 1 then // down wheel
        send(handle(this), 277, 3, 0)
    else
        send(handle(this), 277, 2, 0)
    end if
END IF

----------------------------------------------------------------------------


I'm looking forward to your help.

Thanks.

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 15 May 2023 12:12 PM UTC
  2. PowerBuilder
  3. # 1

Hi Jeong;

  What MS-Windows O/S are you using?

   I have no scrolling issues on UO's naturally using the middle mouse wheel on DC, Window, UO, etc classes. I'm using both W10 & W11 version 22H2 O/S on native AMD based machines.

Regards ... Chris 

Comment
  1. Benjamin Gaesslein
  2. Monday, 15 May 2023 13:43 PM UTC
Sending the 277 message (WM_VSCROLL) with parameters 2 and 3 basically replaces the default scrolling amount with a PageUp/PageDown, making the DW scroll much faster using the wheel.
  1. Helpful
There are no comments made yet.
Benjamin Gaesslein Accepted Answer Pending Moderation
  1. Monday, 15 May 2023 08:49 AM UTC
  2. PowerBuilder
  3. # 2

Hi,

according to the Microsoft docs for WM_MOUSEWHEEL, wparam is positive when scrolling upwards and negative when scrolling downwards. So you need to check for wparam < 0 / wparam > 0 instead.

Comment
  1. Jeong Hwan Jang
  2. Tuesday, 16 May 2023 00:02 AM UTC
Thanks Benjamin.



You're right.



I modified 'wparam > 0' to 'wparam < 0'. Then it's working well.



That was simple problem and it was my mistake.



Anyway, thank you for your help!



  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 16 May 2023 00:21 AM UTC
Please mark as resolved.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.