Well, as I wrote, I hear it without exception under Windows 7 and 8.1 - and occasionally under Windows 10It seems to be a specific XP behaviour
Error sound after right click drive button
Moderators: Hacker, petermad, Stefan2, white
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
@ghisler(Author)
Could you please test, if this code solves the problem - and still works properly with cm_* commands - with Lazarus?
If so, there is also a possible solution for Delphi.
Could you please test, if this code solves the problem - and still works properly with cm_* commands - with Lazarus?
Code: Select all
if ActivePopupMenu <> nil then begin
MessageBeep(mb_iconexclamation);
exit;
end;
When MS GUI devs introduced context menu under right click, they decided that there should be only ONE context menu open.
So when you right click another place, the system always closes already opened context menu and opens a new one in the new place.
You don't have two context menus open at a time. You don't need to close any context menu if you want to do anything else (f.e. open another context menu in a different context) - there is even NO button to close context menu and there is NO warning/error sound when you right click many times one by one (if there is no modal windows open).
So when you right click another place, the system always closes already opened context menu and opens a new one in the new place.
You don't have two context menus open at a time. You don't need to close any context menu if you want to do anything else (f.e. open another context menu in a different context) - there is even NO button to close context menu and there is NO warning/error sound when you right click many times one by one (if there is no modal windows open).
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The problem isn't the opening of multiple context menus - Windows does prevent that. The problem is with internal processing when the user calls multiple context menu functions at once. Therefore I will keep the error beep in place.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
2ghisler(Author)
Can you please comment the reason of that behavior?DrShark wrote:... I noticed a difference when entering "System Volume Information" in c:\ in file panel (by mouse left doubleclick or keyboard Enter key) and by executing
cd "c:\System Volume Information"
from TC's command line: in second case there is no "Critical stop" sound after pressing OK button or Esc key in error dialog.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Hmm, no idea - the entered path gets a "cd" in front and is sent to the same function as the command line.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
@ghisler(Author): I can see two solutions for the original problem described in this topic.
1) Instead of using ShowRightclickMenuActive variable, just use ActivePopupMenu <> nil clause:
2) If, for some reason, the ShowRightclickMenuActive variable cannot be replaced in this way, beeps can still be limited to situations, when a popup menu is being displayed:
If you could tell me if this solves the problem in Lazarus, I could post a similar solution for Delphi.
Regards
1) Instead of using ShowRightclickMenuActive variable, just use ActivePopupMenu <> nil clause:
Code: Select all
if ActivePopupMenu <> nil then begin
MessageBeep(mb_iconexclamation);
exit;
end;
Code: Select all
if ShowRightclickMenuActive then begin
if ActivePopupMenu <> nil then // ADDED HERE
MessageBeep(mb_iconexclamation);
exit;
end;
Regards
If it's some problem with races, you can add delay when processing right clicks, as it is for right click on file list.ghisler(Author) wrote:The problem is with internal processing when the user calls multiple context menu functions at once.
You have already stated, that there is NO system error when using double right click or double click twice, so error sound is misleading for common users (what app gives error?) and annoying for all users (the second right click is the right one, intended by user, <pun also intended>).
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Unfortunately I cannot tell whether the user right clicked again on purpose, or whether the right click notification was sent twice due to some error. Therefore I prefer to keep it as it is for now.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Right clicking many times one by one is definitely NOT an error. It's a NORMAL way to learn program features.
And in a common use right clicking twice is NOT an error as well, but it may be a mistake. In such cases the first right click usually misses intended target in a hurry or because of dirty mousepad, so the second right click is done on purpose to finish intended actions.
And in a common use right clicking twice is NOT an error as well, but it may be a mistake. In such cases the first right click usually misses intended target in a hurry or because of dirty mousepad, so the second right click is done on purpose to finish intended actions.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
So what do you expect me to do? Either not play any error sound at all, and the user wonders why the menu doesn't open. Or play an error sound, and it also gets played when there isn't an error? These are the two only options.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
But the context menu DOES open, in all the cases and at the right place, no matter - intended or not. NO error sound is nedeed in any case.ghisler(Author) wrote: Either not play any error sound at all, and the user wonders why the menu doesn't open.
Mistake IS NOT an error. Where do you see (not hear) a real error?ghisler(Author) wrote:Or play an error sound, and it also gets played when there isn't an error? These are the two only options.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
OK, I removed the MessageBeep call, and - surprise - it still beeps! It was actually something completely different: The previous context menu was returning 0 as selected item, and TC beeped to signal an error. I will fix it.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com