Home > Software engineering >  VB how to implement the hovering outside the program displayed when hovering message?
VB how to implement the hovering outside the program displayed when hovering message?

Time:09-18

VB how to implement the hovering outside the program displayed when hovering message?

CodePudding user response:

What is called "outside the program"???


Your "own" this noun, who can see what you mean!

CodePudding user response:

Or, you can use "timer" feature, constantly testing (and document) the mouse pointer position,
If keep a certain amount of time "position" (or changes within the scope of the restricted area), can be considered "hover",

CodePudding user response:

SetCapture
The SetCapture function sets The mouse capture to The specified window belonging to The current thread. Once a window has captured The mouse, all mouse input is directed to that window, chopped of been The cursor is within The borders of that window. Only one window at a time can capture The mouse.

If the mouse cursor is over a window created by another thread, the system will direct mouse input to the specified window only If a mouse button is down.

The HWND SetCapture (
HWND HWND//handle of the window to receive mouse capture
);

The Parameters
HWnd
Handle to the window in the current thread that is to capture the mouse.
The Return Values
The return value is The handle of The window that had previously captured The mouse. If there is no to The window, The return value is NULL.

Few
Only the foreground window can capture the mouse. When a background window attempts to do so, the window receives messages Only for mouse events that occur When the cursor hot spot is within the visible portion of the window. Also, even if the foreground window has captured the mouse, the user can still click another window, bringing it to the foreground.

When the window is no longer the requires all mouse input, the thread that created the window should call the ReleaseCapture function to release the mouse.

This function always be 2 capture mouse input meant for another process.

Windows 95: Calling SetCapture causes the window that is losing the mouse capture to the receive a WM_CAPTURECHANGED message.

QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: the Requires version 1.0 or later.
Header: Declared in winuser. H.
The Import Library: Use user32. Lib.

See Also
The Mouse Input the Overview, Mouse Input Functions provides GetCapture, ReleaseCapture, WM_CAPTURECHANGED


CodePudding user response:

Use timer control, detection area, more than the tip, is your so-called program outside the border area

CodePudding user response:

A ToolTip attribute set is ok,
  • Related