I have a question about the progress bar.
Code: Select all
#include "FiveWin.ch"
func test()
local aantal := 1
local oProgress,oDlg,i
DEFINE DIALOG oDlg RESOURCE "TESTPROGRESS"
REDEFINE PROGRESS oProgress ID 150 OF oDlg
ACTIVATE DIALOG oDlg CENTERED ON INIT oProgress:SetRange( 0, 38 ) NOWAIT
SysRefresh()
FOR i = 1 to 38
aantal += 1
oProgress:SetPos( aantal )
WaitSeconds( .25 )
NEXT i
msginfo(oProgress:nPosition)
oDlg:end()
return
Code: Select all
1 24 "c:\fwh\FWH710\samples\WinXP\WindowsXP.Manifest"
TESTPROGRESS DIALOG 7, 23, 343, 43
STYLE 0x4L | WS_POPUP | WS_MINIMIZEBOX | WS_MAXIMIZEBOX
FONT 8, "MS Sans Serif"
{
GROUPBOX "Openen van bestanden", -1, 3, 6, 337, 28, BS_GROUPBOX
CONTROL "", 150, "msctls_progress32", 0 | WS_CHILD | WS_VISIBLE, 7, 17, 327, 12
}
If I run this, the progress bar is 100% at the end, but if I comment the 'WaitSeconds( .25 )' line, because I want
an other function there, then progress bar is empty.
I already tried oProgress:refresh(), oDlg:refresh() and sysrefresh(), but the bar is never 100% full.
How can do an update of the progress-line?
Thanks,
Marc