Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Play sound from RDP
Message
De
08/07/2021 17:20:34
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Play sound from RDP
Divers
Thread ID:
01681751
Message ID:
01681751
Vues:
50
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
Répondre
Fil
Voir

Click here to load this message in the networking platform