Un Relog(Relógio)

Un Relog(Relógio)

Postby karinha » Thu Nov 23, 2006 3:16 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7855
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Postby karinha » Thu Nov 23, 2006 7:38 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7855
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Postby Silvio » Fri Nov 24, 2006 10:47 am

thanks

I want ask you How I can set a time
I explain you I want show only for one hour and the clock must go back
01:00
00:59
00:58
00:57
ecc
and then when th etime is 00:00 it must sing a song

it is possible ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby karinha » Fri Nov 24, 2006 11:06 am

Silvio,

Please, Translate for Spanish (language).

Use Google.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7855
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Postby Silvio » Fri Nov 24, 2006 11:19 am

Desearía crear un cronómetro para fijar la época del uso de una computadora a partir de una hora a cero y en el extremo cantar una canción.
Espero que hayas entendido que deseo creo un mini despertador
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby karinha » Fri Nov 24, 2006 11:41 am

//-> Original by c:\FWH27\SAMPLES\LEDDISP.PRG

#Include "FiveWin.Ch"

Static nGet
Static oBmp1, oBmp2, oBmp3, oBmp4, oBmp5

//----------------------------------------------------------------------------//

Function Velocimetro()

Local oDlg, oGet

nGet := 0

DEFINE DIALOG oDlg FROM 0, 0 TO 20, 60 ;
TITLE "Mostrando um Velocimetro/Cronômetro"

oDlg:lHelpIcon := .F.

//--------------------Área do DisPlay do Cronômetro------------------------

/* Cada dígito é de 34 x 48 */

/* Copie o "DisPlay.Bmp" de \FW..\BitMaps\ Para o Seu Diretório de Uso */

@ 002, 001 SAY 'Contador : ' OF oDlg

@ 000, 000 BITMAP oBmp1 FILE "..\BitMaps\DisPlay.Bmp" OF oDlg

@ 000, 000 BITMAP oBmp2 FILE "..\BitMaps\DisPlay.Bmp" OF oDlg

@ 000, 000 BITMAP oBmp3 FILE "..\BitMaps\DisPlay.Bmp" OF oDlg

@ 000, 000 BITMAP oBmp4 FILE "..\BitMaps\DisPlay.Bmp" OF oDlg

@ 000, 000 BITMAP oBmp5 FILE "..\BitMaps\DisPlay.Bmp" OF oDlg

//-------------------------------------------------------------------------

oBmp1:nTop := 28
oBmp1:nLeft := 80
oBmp1:nBottom := 52
oBmp1:nRight := 97

oBmp2:nTop := 28
oBmp2:nLeft := 98
oBmp2:nBottom := 52
oBmp2:nRight := 115

oBmp3:nTop := 28
oBmp3:nLeft := 116
oBmp3:nBottom := 52
oBmp3:nRight := 133

oBmp4:nTop := 28
oBmp4:nLeft := 134
oBmp4:nBottom := 52
oBmp4:nRight := 151

oBmp5:nTop := 28
oBmp5:nLeft := 152
oBmp5:nBottom := 52
oBmp5:nRight := 169

//--------------------Área dos Say's---------------------------------------

@ 002, 030 SAY "Evandro 1 Minuto" OF oDlg
@ 2.5, 030 SAY "Tem 60 Segundos " OF oDlg

@ 004, 010 SAY "Use Sua Imaginação... Estás Trabalhando Com Horas..." OF oDlg

@ 005, 010 SAY "Vai Contar até 180 Milésimos de Secs = 3 Segundos. " OF oDlg

@ 006, 010 SAY "By João Santos - In FiveWin The Best! " OF oDlg

@ 007, 010 SAY "Todos os Direitos Reservados - 27/12/2003 " OF oDlg

//--------------------Área dos Botões--------------------------------------

@ 007, 002 BUTTON "&Aumentar" OF oDlg SIZE 40, 12 ;
ACTION ( nGet++, Por_Bmp( oBmp1, oBmp2, oBmp3, oBmp4, oBmp5, nGet ) )

@ 007, 010 BUTTON "&Diminuir" OF oDlg SIZE 40, 12 ;
ACTION ( nGet--, Por_Bmp( oBmp1, oBmp2, oBmp3, oBmp4, oBmp5, nGet ) )

@ 007, 018 BUTTON "&Executar" OF oDlg SIZE 40, 12 ;
ACTION Executar_Bmp()

@ 007, 026 BUTTON "&Saida" OF oDlg ;
ACTION ( oDlg:End ) CANCEL

ACTIVATE DIALOG oDlg CENTERED

EndDialog() // Fechar a Dialog

Return Nil

//----------------------------------------------------------------------------//

Function Executar_Bmp()

Local I

Local nSegundos

// 1 Hora = 3600 Segundos - ( 60 * 60 )
// 3 Segundos = 180 Milésimos de Segundos

// Fórmula Para Calculo de Horas, Minutos, Segundos, Etc... Ex. Simples
nSegundos := Seconds() + ( 3600 + 5 ) / 60 * 3 //( 3 = Qtde. de Segundos)

For I = 1 To ( nSegundos - Seconds() )

Por_Bmp( oBmp1, oBmp2, oBmp3, oBmp4, oBmp5, I )

SysRefresh()

Next I

Return Nil

//----------------------------------------------------------------------------//

Function Por_Bmp ( oBjeto1, oBjeto2, oBjeto3, oBjeto4, oBjeto5, nQuantidade )

Local cNum := SPACE( 5 )
Local nLen := 3
Local nDigito1 := 3
Local nDigito2 := 3
Local nDigito3 := 3
Local nDigito4 := 3
Local nDigito5 := 3

cNum := STR( nQuantidade )
nLen := LEN( cNum )

nDigito1 := VAL( SUBSTR( cNum, nLen - 4, 1 ) )

If nDigito1 = 0
oBjeto1:nX := -528 // 0 - (11 * 48)
Else
oBjeto1:nX := 0 - ( nDigito1 * 48 )
Endif

nDigito2 := VAL( SUBSTR( cNum, nLen - 3, 1 ) )

If nDigito2 = 0 .AND. nDigito1 = 0
oBjeto2:nX := -528
Else
oBjeto2:nX := 0 - ( nDigito2 * 48 )
Endif

nDigito3 := VAL( SUBSTR( cNum, nLen - 2, 1 ) )

If nDigito3 = 0 .AND. nDigito2 = 0 .AND. nDigito1 = 0
oBjeto3:nX := -528
Else
oBjeto3:nX := 0 - ( nDigito3 * 48 )
Endif

nDigito4 := VAL( SUBSTR( cNum, nLen - 1, 1 ) )

If nDigito4 = 0 .AND. nDigito3 = 0 .AND. nDigito2 = 0 .AND. nDigito1 = 0
oBjeto4:nX := -528
Else
oBjeto4:nX := 0 - ( nDigito4 * 48 )
Endif

nDigito5 := VAL( SUBSTR( cNum, nLen, 1 ) )

oBjeto5:nX := 0 - ( nDigito5 * 48 )

oBjeto5:Refresh( .F. )
oBjeto4:Refresh( .F. )
oBjeto3:Refresh( .F. )
oBjeto2:Refresh( .F. )
oBjeto1:Refresh( .F. )

SysRefresh()

Return Nil
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7855
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Postby Silvio » Fri Nov 24, 2006 12:41 pm

gracias - thanks
BUT
it not run ok
I tryed with xharbour /fw and it not run
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 112 guests