[Gambas-user] Progressbar
scatman
scatman_ at ...17...
Fri Dec 31 16:44:13 CET 2004
Am Freitag, 31. Dezember 2004 17:02 schrieb Charlie Reinl:
Hi,
> Salut,
>
> without seeing the code , I would say
>
> try a WAIT in the loop
>
Here the Code (Wait don't Helps)
PUBLIC hNew AS FStatus
FStatus.Visible = TRUE
____________________
<Schnip>
(Main)
##########################################################
PUBLIC SUB ProgressBar_Timer(OPTIONAL Result$ AS String )
DIM ckSize AS File
DIM x AS Integer
DIM z AS Integer
DIM PTimer AS Float
'DIM result AS String
DIM VobSize[21] AS Float
'nach vorhandenen VOBs gucken. Zur Berechnung von PTimer
FOR x = 20 TO 0 STEP - 1
FOR z = 20 TO 0 STEP - 1
IF Exist(sPath &/lsDVD&/"VIDEO_TS/VTS_0" & x & "_" & z & ".VOB") THEN
OPEN sPath&/lsDVD&/"VIDEO_TS/VTS_0" & x & "_" & z & ".VOB" FOR READ AS #ckSize
VobSize[x] = Lof(ckSize)
SummeGesammt = SummeGesammt + VobSize[x] / 1024 * 1000
END IF
NEXT
NEXT
PTimer = Round(SummeGesammt * 100 / FilmLaengeKb)
Result$ = Str(PTimer)
'This one works in the Main
ProgressBar1.Value = Mid$(Result$, 1,1) & "." & Mid$(Result$, 3.1) &
Mid$(Result$,4,1)
SummeGesammt = 0
hNew = NEW FStatus (Result$)
END
################################################################
'Gambas Class file
'Form2 (FStatus)
PUBLIC SUB _New (OPTIONAL result$ AS String )
' and this one dont work
ProgressBar1.Value = Mid$(Result$, 1,1) & "." & Mid$(Result$, 3.1) &
Mid$(Result$,4,1)
'but i can Print the Values out in the DirektWindow
PRINT "Value in FORM 2 = ", Mid$(Result$, 1,1) & "." & Mid$(Result$, 3.1) &
Mid$(Result$,4,1)
END
##################################################################
thx
More information about the User
mailing list