Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating progress show bar....
Message
 
To
05/12/2002 08:39:45
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00729844
Message ID:
00729856
Views:
20
This message has been marked as a message which has helped to the initial question of the thread.
>Hi to all,
>
>How can I create in FoxPro 2.6 for DOS !!! a progress show bar, that indicate the percentage of a running process ... like, I want to make something in a procedure, and during this I want to saw a progressive bar.
>It's possible this thing ????
>
>Thanks anyway.

Luka,

Yep, it is. Here's the code generated by a screen I wrote in DOS 2.5a ten years ago via Genscrn. Please note, that since then my coding style has changed considerable.< g >
*       ***********************************************************
*       *                                                         *
*       *              THERM Setup Code - SECTION 1               *
*       *                                                         *
*       ***********************************************************
*

#REGION 1
PARAMETERS CURRNUM, TOTNUM, TYP
HALFSEC = "Ý"
BARSEC = "Û"
PCTDONE = CURRNUM / TOTNUM
BARLEN = 50 * PCTDONE
THERMBAR = REPLICATE(BARSEC, INT(BARLEN))
IF BARLEN - INT(BARLEN) >= 0.5
  THERMBAR = THERMBAR + HALFSEC
ENDIF
IF PARAMETERS() > 2
  MSG = TYP
ELSE
  MSG = ""
ENDIF
#REGION 0
REGIONAL m.currarea, m.talkstat, m.compstat

m.compstat = SET("COMPATIBLE")
SET COMPATIBLE FOXPLUS

*       ***********************************************************
*       *                                                         *
*       *                    Window definitions                   *
*       *                                                         *
*       ***********************************************************
*

IF NOT WEXIST("thermomtr")
	DEFINE WINDOW thermomtr ;
		FROM INT((SROW()-6)/2),INT((SCOL()-58)/2) ;
		TO INT((SROW()-6)/2)+5,INT((SCOL()-58)/2)+57 ;
		FLOAT ;
		NOCLOSE ;
		SHADOW ;
		DOUBLE ;
		COLOR SCHEME 5
ENDIF


*       ***********************************************************
*       *                                                         *
*       *                   THERM Screen Layout                   *
*       *                                                         *
*       ***********************************************************
*

#REGION 1
IF WVISIBLE("thermomtr")
	ACTIVATE WINDOW thermomtr SAME
ELSE
	ACTIVATE WINDOW thermomtr NOSHOW
ENDIF
@ 1,2 TO 3,53
@ 0,3 SAY "Processing..." + MSG
@ 2,3 SAY thermbar ;
	SIZE 1,50

IF NOT WVISIBLE("thermomtr")
	ACTIVATE WINDOW thermomtr
ENDIF

IF CURRNUM = TOTNUM
  RELEASE WINDOW thermomtr
ENDIF
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform