Confirmation click sound on every button clicked

Anyone done something like this globally in the app?

I have a tablet app and users wish some feedback when they press any button control in my app. Many buttons I tell you, especially since I’ve created my own virtual keyboard inside the app.

I’ve checked windows system sounds but nothing there regarding button clicking. I don’t wanna edit every single procedure/button adding some “play(‘click.wav’)”

If that was on a system level, even better…

I added that to my PictureButtons class because I thought it was hilarious. But it’s actually pretty awful.

Yeh, it would have to be subtle, really a short click sound, buzz or something. But getting such sound is not a problem, I guess it would have to be a template that would add code to take.event() like

 case event()
     of event:accepted
      if ?{prop:type}=create:button

or something like this…

Yeah, something like that. If the timing of the sound doesn’t “seem right”, you might need to play with alert keys for mouse up or down. A small class could be used in addition to your template.

1 Like

Wouldn’t it be simplest to replace the global class for WindowManager
and in it have

GlobalWindowManagerBase.TakeAccepted PROCEDURE()
  RETURN Parent.TakeAccepted()

Would it be possible to leave the default class but sort of derive takeaccepted?

1 Like

I haven’t tried to compile this, but something like this is what I had in mind

WindowManager Replacement (

Note InitMedia is called once at program start up - not for each window

1 Like

Hm, like the idea. I’d just like to leave original abc files intact. I guess that means making a template, right?

There’s no need to alter the shipping ABC files.
There’s no need for a template.

see Writing Derived ABC Classes for APPs - ClarionHub

A quick summary of the steps:
Write the derived class
Put it in a folder that ScanABC knows about
Refresh Classes
In Global Properties > Actions etc. :: change the WindowManager to MyDerivedWindowManager
Regenerate and Compile

Later, If you want to enhance your WindowManager replacement
then alter the class as desired
if there are new methods, that you need embeds for
– save, refresh classes, regenerate
Compile (whether there are new methods or not)

1 Like

Ok, that’s a whole new world for me, but I will dig into it. Btw, where do I get the .inc file you included in your github code?

If you mean the

  • it’s right there in the Gist
  • you can download the entire gist as a zip
    (i’m not sure if there will be unix line endings doing it that way)
  • you can also click on RAW and then copy paste the code out of your browser.

If you mean the ctMCI, which wraps up mciSendStringA etc
then I guess I could share that too if it’s of interest.

Yes, the ctMCI too, please :slight_smile: appreciate it.

Clarion Class ctMCI - which wraps mciSendStringA etc. (

1 Like