Meter Time

Meter Time

Postby Silvio.Falconi » Sat Jan 26, 2013 9:56 am

How create a small Meter ( Tprogress or Meterex) with time : I wish show the bar until 1 minute and then when it finish close the dialog
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Meter Time

Postby Marcelo Via Giglio » Sat Jan 26, 2013 4:14 pm

Hi,

you can combine meter with TIMER or with sleep() or millisec() xHb function

saludos

Marcelo
Marcelo Via Giglio
 
Posts: 1064
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: Meter Time

Postby Silvio.Falconi » Tue Jan 29, 2013 9:14 am

can I have a minimal sample to test ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Meter Time

Postby armando.lagunas » Wed Jan 30, 2013 6:17 pm

Silvio:

my function for show the bar until 30 seconds and then it closes the dialog

example for use:

msgflip("this is a fivewin...")

Code: Select all  Expand view

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

STATIC FUNCTION TrayTimer( DlgT, nInterval, oMet )
LOCAL oTmr
   DEFINE   TIMER oTmr OF DlgT INTERVAL 1 ACTION ( oMet:nPosition +=1, IIF(oMet:nPosition > nInterval, DlgT:End(), ) )
   ACTIVATE TIMER oTmr
RETURN nil

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

FUNCTION MsgFlip( cMsg )
LOCAL aRct, oDlgAct, oMet

   DEFINE DIALOG oDlgAct RESOURCE 23

      REDEFINE STSAY PROMPT cMsg ID 10 COLORS CLR_YELLOW OF oDlgAct FONT oApp:cFontMsg

      oMet := TProgress():Redefine( 13, oDlgAct )

   ACTIVATE DIALOG oDlgAct CENTER  ON PAINT ( aRct := GetClientRect( oDlgAct:hWnd ), GradColor( oDlgAct:hDC, aRct, CLR_GRAY, _CLRGRAY ) ) ;
                   ON INIT ( oMet:SetRange(1,200),TrayTimer( oDlgAct, 250, oMet ) )
RETURN Nil

//----------------------------------------------------------------------
 
SkyPe: armando.lagunas@hotmail.com
Mail: armando.lagunas@gmail.com
User avatar
armando.lagunas
 
Posts: 346
Joined: Mon Oct 05, 2009 3:35 pm
Location: Curico-Chile


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 95 guests