FoxPro/Visual FoxPro - juan fernando - sonidos

 
Vista:

juan fernando - sonidos

Publicado por mauro (5 intervenciones) el 13/11/2008 17:42:03
el time q me da error me lo pasaste vos asi, como lo corrigo?
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:juan fernando - sonidos

Publicado por Juan Fernando (1 intervención) el 13/11/2008 18:07:01
este es el código va en el evento valid de una text,tendrías que modicar parte
de el y adaptarlo .

Set bell ON
set talk off
Publ cod,nom,ape
Publ fe1,fe2
fe1=ctod("")
fe2=ctod("")

Sele tabla1

cod=Thisform.Text1.Value

Locate for Allt(Codigo)=Allt(cod)

nom=nombre
ape=apellido
fe1=fecha1
fe2=fechaexam


If Found()
Set Filter to Allt(Codigo)=Allt(cod)
Thisform.Command1.Enabled=.f.
*Thisform.Text2.Enabled=.f.
*------------------------------------------------------------------------

Thisform.Text2.Value=nom
Thisform.Text3.Value=ape
*Thisform.Text5.Value=date()
*Thisform.Text5.Value=fe2-31
Publ num1,num2
Store 0 To num1,nom2
Thisform.Text5.Value=date()
Thisform.Text4.Value=fe2

Num1=Day(Thisform.Text5.Value)
Num2=Day(Thisform.Text4.Value)

Thisform.Text6.Value=Round((num2-num1),0)
** aquí generamos el sonido de aviso ¿ cuántos dias faltan para el exámen ?
If Num1=Num2

Set Bell To "C:SistemaSonidoGallo.WAV"
??CHR(7)

Else

Set Bell To "C:SistemaSonidoVaca.WAV"
??CHR(7)

Endif



messagebox(' Código Encontrado **PUEDE SOLO MODIFICAR O ELIMINAR **',0+48+0,' ADVERTENCIA ')


Thisform.Command1.Enabled=.f.
Else
**-------------------------------------------------------------------
** **

messagebox(' código No ** Grabado **',0+48+0,' ADVERTENCIA ')
Thisform.Command1.Enabled=.t.
Return=.F.

Endif

Thisform.Text1.Refresh
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar