Announcement

Collapse
No announcement yet.

The sound of Windows...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Alain
    replied
    Hey colc,

    Finally I think that is what I am going to do.
    (I don't know how to implement the SND_ASYNC flag in the function.)

    Thanks a lot.

    Alain.

    Leave a comment:


  • colc
    replied
    Hey Alain,
    Why not just use audio load Windows sounds (wave files) found int the C:\Windows|Media folder?

    Leave a comment:


  • Alain
    replied
    Dear herrin, I understand your way of thinking but on the one hand Global is not a good solution for me the problem is not here.
    If i want to close the dialog immediately it's not possible with DLL.CallFunction (see my second example) but its possible with Audio.Load (try).

    In my case, I can have 4 or 5 warning windows for example and I want to be able to close them quickly.
    And for practical reasons, I would like to use Windows sounds. I think it's better for a Windows application!

    Any idea?

    Thanks.

    Alain.

    Windows Sound with counter and Enter.apz

    Leave a comment:


  • herrin
    replied
    Code:
    [ATTACH]n305198[/ATTACH]

    Leave a comment:


  • Alain
    replied
    hello herrin tanks for your reply but I think you did not understand what I wanted to highlight:
    - In the first case Dialog1, OsName appears at the end of the windows sound, which is not great.
    - In the second case dialog2, OsName appears immediately which is much better.

    On Widows10 these sounds are listed here for winmm.dll:

    HKEY_CURRENT_USER\AppEvents\EventLabels\Notificati on.IM

    Code:
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"SystemDefault\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"SystemHand\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);-- Critical Stop
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"WindowsLogon\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"WindowsUnlock\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"WindowsUAC\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"Notification.SMS\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"Notification.Reminder\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"Notification.Proximity\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"Notification.Looping.Alarm\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"Notification.IM\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"Notification.Default\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"MailBeep\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"FaxBeep\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"DeviceFail\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"DeviceDisconnect\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"DeviceConnect\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"CriticalBatteryAlarm\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"Notification.Looping.Call10\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    DLL.CallFunction(_SystemFolder.."\\winmm.dll", "PlaySound", "\"Notification.Looping.Call5\",0,65536", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    Look at my second exemple with counter:

    Windows Sound with counter.apz

    Leave a comment:


  • herrin
    replied


    Code:
    [ATTACH]n305193[/ATTACH]

    Leave a comment:


  • Alain
    started a topic The sound of Windows...

    The sound of Windows...

    Hello everyone, the forum does not seem very active at this time!

    I have a question about using windows sounds with DLL.CallFunction.
    Is it possible to have no latency with the "DLL.CallFunction" as with "Audio.Load"?
    I would like to use Windows sounds rather than reported sounds.

    See my example in attachment.
    (On Show Dialog1 Dialog2)

    Cordially,

    Alain.
    Windows Sound.apz
Working...
X
😀
🥰
🤢
😎
😡
👍
👎