Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Syntax 2: For windows – PB Docs 2017 – PowerBuilder Library

Syntax 2: For windows – PB Docs 2017

Syntax
2: For windows

Description

Occurs when the pointer is moved within the window.

Event ID

Event ID

Objects

pbm_mousemove

Window

Arguments

Argument

Description

flags

UnsignedLong by value (the modifier keys and mouse
buttons that are pressed).

Values
are:

  • 1 — Left mouse button

  • 2 — Right mouse button

  • 4 — Shift key

  • 8 — Ctrl key

  • 16 — Middle mouse button

Flags is the sum of all the buttons and
keys that are pressed.

xpos

Integer by value (the distance of the pointer from
the left edge of the window’s workspace in
pixels).

ypos

Integer by value (the distance of the pointer from
the top of the window’s workspace in pixels).

Return Values

Long.

Return code choices (specify in a RETURN statement):

0 — Continue processing

Usage

Because flags is a sum of button and key numbers, you can find out
what keys are pressed by subtracting the largest values one by one and
checking the value that remains. For example:

  • If flags is 5, the Shift key (4) and the left mouse button (1)
    are pressed.

  • If flags is 14, the Ctrl key (8), the Shift key (4), and the
    right mouse button (2) are pressed.

This code handles all the buttons and keys (the local boolean
variables are initialized to false by default):

Most controls in a window do not capture MouseMove events — the
MouseMove event is not mapped by default. If you want the window’s
MouseMove event to be triggered when the mouse moves over a control, you
must map a user-defined event to the pbm_mousemove event for the
control. The following code in the control’s user-defined MouseMove
event triggers the window’s MouseMove event:

Examples

This code in the MouseMove event causes a meter OLE custom control
to rise and fall continually as the mouse pointer is moved up and down
in the window workspace:

Uf_setmonitor is a window function that scales the pixels to the
range of the gauge. It accepts three arguments: the vertical position of
the mouse pointer, an OLECustomControl reference, and the maximum range
of the mouse pointer for scaling purposes:

The OLE custom control also has a MouseMove event. This code in
that event keeps the gauge responding when the pointer is over the
gauge. (You need to pass values for the arguments that are usually
handled by the system; the mouse position values are specified in
relation to the parent window.) For example:

See also

Clicked

MouseDown

MouseUp


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x