FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Meter Time
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Meter Time
Posted: Sat Jan 26, 2013 09: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 March-April 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
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: Meter Time
Posted: Sat Jan 26, 2013 04:14 PM

Hi,

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

saludos

Marcelo

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Meter Time
Posted: Tue Jan 29, 2013 09: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 March-April 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
Posts: 346
Joined: Mon Oct 05, 2009 03:35 PM
Re: Meter Time
Posted: Wed Jan 30, 2013 06: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 (fw): Select all Collapse
//----------------------------------------------------------------------

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

Continue the discussion