Hi,
I am having a problem while using Progress control. The problem is that it never reaches 100%.
The problem exists only when Manifest file is used. Is there any solution to this problem ? Or Am I doing something wrong ?
I am herewith pasting a sample code which demonstrate the problem. I am using both Meter and Progress.
In the below given sample code the Meter reaches 100%, but the Progress control reaches only somewhere around 85%

.RC File content
If I comment out the following line on the Function DoProcess()
then progress bar reaches 100%.
The above code is just a sample to demonstrate the problem, but in my real application, If I comment out the
then the Progress bar suddenly reaches 100% even though the loop has not finished yet its execution.
This is how I have coded in my real application
If I replace Progress with Meter then everything is working fine.
This problem exists only when Progress is used with the .Manisfest in .RC file otherwise everything is working fine
I am using Vista Business 32 bit
Any help ?
Regards
Anser
I am having a problem while using Progress control. The problem is that it never reaches 100%.
The problem exists only when Manifest file is used. Is there any solution to this problem ? Or Am I doing something wrong ?
I am herewith pasting a sample code which demonstrate the problem. I am using both Meter and Progress.
In the below given sample code the Meter reaches 100%, but the Progress control reaches only somewhere around 85%

#Include "FiveWin.Ch"
*----------------------*
Function Main()
*----------------------*
Local oWnd,oProgress,oMeter,nActual,oBtn
DEFINE WINDOW oWnd TITLE "Test Progress and Meter"
@ 2, 5 METER oMeter VAR nActual OF oWnd SIZE 400, 30 Â Â Â Â Â Â Â Â Â Â Â
@ 5, 7 PROGRESS oProgress OF oWnd SIZE 400, 30 Â
@8,10 BUTTON oBtn ACTION DoProcess(oMeter,oProgress) SIZE 50,50
ACTIVATE WINDOW oWnd
Return
*----------------------------------------
Function DoProcess(oMeter,oProgress)
*----------------------------------------
oMeter:nTotal:=111
oProgress:SetRange( 0, 111 )
for n = 1 to 111
  oMeter:Set( n )
  oProgress:SetPos( n )
  Sleep( 50 )
  SysRefresh()
next
MsgInfo( n )
Return.RC File content
1 24 "WindowsXP.Manifest"If I comment out the following line on the Function DoProcess()
// oProgress:SetRange( 0, 111 )then progress bar reaches 100%.
The above code is just a sample to demonstrate the problem, but in my real application, If I comment out the
oProgress:SetRange( 0, nTotRec ) // nTotRec is the no. of times the loop is going to workthen the Progress bar suddenly reaches 100% even though the loop has not finished yet its execution.
This is how I have coded in my real application
Select MyDbf
nTotRec:=RecCount()
nActual:=1
oProgress:SetRange( 0, nTotRec )
Do While !EOF()
  oProgress:SetPos( nActual++ )
    Skip
Enddo
MsgInfo( Str(nTotRec ) + CRLF + Str(nActual) ) Â
// Value of nTotRec and nActual is the same, but Progressbar not reached 100% - if I use oProgress:SetRange( 0, nTotRec )
// Value of nTotRec and nActual is the same but Progressbar reached 100% even before the Do while loop ended - If I don't use oProgress:SetRange( 0, nTotRec )If I replace Progress with Meter then everything is working fine.
This problem exists only when Progress is used with the .Manisfest in .RC file otherwise everything is working fine
I am using Vista Business 32 bit
Any help ?
Regards
Anser