Progress bar

Progress bar

Postby Silvio » Fri Apr 14, 2006 10:43 pm

How I can show one bar in order to show a passed time? and to play each second a sound ?

Example : 2 minutes
Best Regards, Saludos

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

Postby Antonio Linares » Fri Apr 14, 2006 11:53 pm

Silvio,

Use a timer
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Silvio » Sat Apr 15, 2006 12:51 pm

I must show Meter line because I must make a test for my boys at school

Regards
Best Regards, Saludos

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

Postby Antonio Linares » Sat Apr 15, 2006 4:05 pm

Silvio,

I meant: use a timer to update the meter value.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Silvio » Sat Apr 15, 2006 4:28 pm

can YOu write a small sample to see How I can make it ?

Regards
Best Regards, Saludos

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

Postby Antonio Linares » Sat Apr 15, 2006 4:59 pm

Silvio,
Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oDlg, oProg
   
   DEFINE DIALOG oDlg TITLE "Progress and timer"

   @ 1, 3 PROGRESS oProg POSITION 0 SIZE 120, 10
   
   @ 2.5, 10 BUTTON "End" ACTION oDlg:End()
   
   ACTIVATE DIALOG oDlg CENTER ;
      ON INIT Timer( oDlg, oProg )
   
return nil   

function Timer( oDlg, oProg )
   
   local oTmr
   
   DEFINE TIMER oTmr INTERVAL 1000 ;
      ACTION ( oProg:nPosition += 5, MsgBeep(),;
             If( oProg:nPosition == 100, oTmr:End(),) ) OF oDlg

   ACTIVATE TIMER oTmr

return nil   
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Silvio » Sat Apr 15, 2006 10:40 pm

thanks
Best Regards, Saludos

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

Postby Silvio » Sun Apr 16, 2006 9:06 pm

Dear Antonio,

first problem
How I can to set the timer ?
on your example U use interval 1000
it is egual to one minute ?

second problem
How I can to show on progress bar the time remaining ( with number) ?


third problem
I made a game at school
when a boy does not answer well to a question in the test the procedure must remove the remaining time.
It is possible ?
How I can make to call a func to remove time to progress bar ?


Best Regards
Best Regards, Saludos

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

Postby Antonio Linares » Sun Apr 16, 2006 11:11 pm

Silvio,

1. milliseconds

2. Use a TMeter instead of a progress bar.

3. Simply set the meter to 100%.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 22 guests