Highlighted
Absent Member.
Absent Member.
517 views

[archive] Capture Mouse

[Migrated content. Thread originally posted on 05 August 2004]

I want to prevent users from using the mouse buttons while our application is processing.

Appendix I.1 "W$MOUSE Routine" mention the following:

"The CAPTURE-MOUSE function causes the runtime to process all mouse messages, regardless of where they occur. This should be done only in special cases, because it prevents the user from using the mouse in any other application."

By using the CAPTURE-MOUSE function the user can not click on our application, but still can click outside our application screen. Is it possible to disable mouse buttons at all cases?

thanks
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Capture Mouse

Am I understanding you correctly if I understand it as you want to inhibit any activity from the user on your entire desktop?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Capture Mouse

That's right, this is that we want.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Capture Mouse

There is a style you can apply to windows in Windows, which make them system modal. This would probably be the appropriate thing to do in this case.
The style I am talking about is MB_SYSTEMMODAL, this does however seem to apply to MessageBoxes only, which won't do any good for us.

I suggest you may try to investigate around MB_SYSTEMMODAL, perhaps there is a counterpart for windows dialogs and then you can apply that to your own window.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.