Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Play sound from RDP
Message
From
08/07/2021 17:20:34
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Play sound from RDP
Miscellaneous
Thread ID:
01681751
Message ID:
01681751
Views:
49
VFP 9 desktop application is running in Windows 2019 server.
??chr(7)
does not play sound (if same application is running in Windows 10, chr(7) plays sound).
RUN notify.wav
plays sound over RDP also but leaves Windows media player open and active.
RUN /N7 notify.wav
throws RUN/! command failed error.

How to play sound in RDP application so that application remains active?

I also tried code below but it does not play sound in RDP application.
PARAMETER times, out
PRIVATE mb, x, nTone
IF TYPE('times') = "L"
    times = 1
    nTone = 1
else
    nTone = iif(times=1,1, iif(times=3,35,75) )
ENDIF
IF EMPTY(out)
    if nTone = 35
        times = 1
        out = .1
    else    
        out = .01
    endif    
ENDIF

IF ! "FOXTOOLS" $ SET('library')
        SET LIBRARY TO foxtools.fll ADDITIVE

ENDIF
mb = regfn("MessageBeep", "I", "I")
&&1=default, 25 = critical,35=question,55=exclamation,75 = asterik

FOR x = 1 TO times
    err = callfn(mb, nTone)
    WAIT "" TIMEOUT out
ENDFOR
RETURN ""
Andrus
Reply
Map
View

Click here to load this message in the networking platform