[Gambas-user] progress bar and shell command which takes ages

Daniel Campos dcamposf at ...626...
Mon Dec 24 18:03:29 CET 2007


May you could do it without loops, use EXEC FOR INPUT or FOR READ, and
read the progress from the application (I assume the console
application pushes a text progress bar or a percentage indicator
during the process), then refresh the ProgressBar anytime you find a
Process_Read() event, something like

PUBLIC hProc AS Process

PUBLIC SUB hProc_Read()

Dim Buf as String

READ #hProc,Buf,Lof(hProc)

' Parse the buffer here

ProgressBar1.Value=whatever

END

PUBLIC SUB StartTheProcess()

hProc=Exec[Application,param1,param2...] FOR INPUT
Object.Attach(hProc,Me,"hProc")

END




2007/12/24, lawrence pires <piresl at ...626...>:
> i would like to integrate a progress bar  but not 100% sure how to do this,
>
> I am using EXEC command to convert a music file from WAA to MP3 this process
> can take 3-4 minutes, and i would some how like to use the progress bar to
> show the progress of the conversion. (is it possible?)
>
> Am I right in saying the the progress bar will only work with a loop? & how
> would i do the loop with the EXEC command?
>
> thanks for reading
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list