Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem sounding wav file
Message
De
07/06/2007 16:56:43
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Problem sounding wav file
Divers
Thread ID:
01231451
Message ID:
01231451
Vues:
62
I'm having a problem sounding an error .wav tone.
I code into a procedure to set bell to xxx.wav, set the bell on, and ? chr(7). When I do this procedure from the command prompt, the bell sounds. Notice I set the xxx.wav and turn bell on in this procedure.

In a form that I am using when I get an error I do the procedure. If I run this form from the command window, I get the error sound when the condition is reached. Everything is fine.

I have this form selected from a menu. If I run the menu from the project manager and then select the option for the form in question, that works too.

When I run the main program to login and activate the menu, I no longer get any sound.

I thought perhaps it was the read events that was causing the problem, but I issue the read events from the command window after loading the menu and I get the sound just fine.

You will notice that I put an on key label f9 in to test ringing of the bell. It does not work

The main program for the application is:
M_cap = "Log Management System"
_screen.caption = ""
a = is_run32(M_cap)
if a > 0
	_screen.WindowState=1 
	=messagebox("LOG Management System is already running on this computer.  Please use the running copy.",16,m_cap)
	quit
endif
_screen.closable = .f. && Turn of the close button and force File/Quit logic
_screen.WindowState = 2 && Startup at full screen
_screen.Caption = M_cap
release M_cap
set talk on
set console off
SET DELETED ON
public laMills, laGrades, laSpecies, m_curmill, pcCompany, pcLocation, pcHcomPort
* set default to c:\vfplogs
if not used('system')
	use system in 0
endif
pcCompany = system.coname
pcLocation = system.locname
m_curmill = system.mill
pcHcomPort = system.hcomport
use

dimension laMills(40), laSpecies(50), laGrades(50)
set century on
do main.mpr

define window x from 0,0 to 200,340 fill file backgrnd.jpg  &&c0238.jpg && 
* define window x from 0,0 to 70,140 fill file backgrnd.jpg  &&c0238.jpg && 
activate window x
zoom window x max 
if file ("startmsg.txt")
	run /n notepad startmsg.txt
	do form startmsg
endif

do form login 
* on key label f9 do testbell
on key label f9 do ringbell
if trim(m_secure) = 'Login Failed'
	quit
else
	read events
endif
The ringbell program is very simple
set bell to "error.wav"
set bell on
?? chr(7)
set bell to
set bell off
What other conditions or commands would effect the sounding of the bell.

Any thoughts will be greatly appreciated.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform