Page 3 of 5
Re: New TprogressWheel
Posted: Thu Sep 12, 2019 5:31 pm
by Silvio.Falconi
ukoenig wrote:Silvio,
that looks great.
I will add the GDIPlus-version as a download to this toppic.
It is nearly finished. Still the color-, speed- and size-selection must be added.
Maybe sound-support ?
In the moment I'm working on some projects the same time.
That makes it a bit difficult.
regards
Uwe

sound ....what's mean ?
Re: New TprogressWheel
Posted: Thu Sep 12, 2019 5:54 pm
by ukoenig
Silvio,
I mean playing optional a wav-file during a selected process.
I will add this option.
regards
Uwe

Re: New TprogressWheel
Posted: Fri Sep 13, 2019 8:35 am
by Silvio.Falconi
ukoenig wrote:Silvio,
I mean playing optional a wav-file during a selected process.
I will add this option.
regards
Uwe

I don't understand what it is for? we have done a circular TProgress / TMeter class are necessary for other procedures. I can use the tprogress to index an archive or an array. the indefinite command could be used instead of the cursor wait on / wait off but put a sound to do what I didn't understand ... do you want to scan every position? you can insert a sound for each oProgress:nposition
Re: New TprogressWheel
Posted: Fri Sep 13, 2019 8:44 am
by Silvio.Falconi
Dear Friends,
then I want to conclude for so many are asking me also in the private mailbox:
When I publish something or ask for something it is always the same story, the extensive questions and the same unpleasant comments.
Some do not like my collaboration with the community and I am aware of it
So it was for so many classes I did
So I preferred to deliver the TprogressWheel class to Antonio Linares who will include it in the new fivewin package, this to avoid further discussion.
I can answer your questions about the class TProgressWheel so I gave full availability to Antonio Linares but did not accuse me of other things that I did not do.
I thank you for your cooperation
Re: New TprogressWheel
Posted: Fri Sep 13, 2019 8:45 am
by ukoenig
Silvio,
I mean just a background-sound during the process ( message ).
regards
Uwe

Re: New TprogressWheel
Posted: Fri Sep 13, 2019 8:47 am
by Silvio.Falconi
you can do it
as you do it with tProgress class it is the same ( change only the geometric figure)
DEFINE TIMER oTimer INTERVAL 50 ACTION (oMeter:SetPos(++nPos), iif(nPos>500,oTimer:End(), yourfunction_sound_here)) OF oDlg
ACTIVATE TIMER oTimer
Re: New TprogressWheel
Posted: Sun Aug 02, 2020 3:44 am
by AIDA
Estan muy bonitos

Re: New TprogressWheel
Posted: Sun Aug 02, 2020 6:09 am
by nageswaragunupudi
Works with harbour/xharbour 32/64 bits, bcc/msvc/gcc
Re: New TprogressWheel
Posted: Sun Aug 02, 2020 7:16 am
by AIDA
nageswaragunupudi wrote:Works with harbour/xharbour 32/64 bits, bcc/msvc/gcc
si ya vi los ejemplos
pero a un no se como usarlo no deja de girar
me pueden orientar
if i already saw the examples
but I don't know how to use it, it doesn't stop spinning
can guide me

Code: Select all | Expand
function miresp2()
local afiles,N
local oDlg, oBrush, oFont, oText, oSmal, oTimer, bAct, bRem, bTimer
local nActual := 0, nTotal := 255, nAdd := 1
local aMeter[ 1 ]
local nRow, lAnimate := .f.
DEFINE BRUSH oBrush FILE "..\bitmaps\sea.bmp" RESIZE
DEFINE FONT oFont NAME "VERDANA" SIZE 0,-20 BOLD
DEFINE FONT oText NAME "TAHOMA" SIZE 0,-18
DEFINE FONT oSmal NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 800,600 PIXEL TRUEPIXEL ;
FONT oFont BRUSH oBrush ;
TITLE "PROGRESS WHEEL CLASS : " + FWVERSION
nRow := 80
afiles:= Directory("c:\mimaterial\data\*.*")
For N:= 1 to len(afiles)
lzCopyfile("c:\mimaterial\data\" + afiles[N,1], "c:\respaldoMT\data\"+afiles[N,1] )
Next
nTotal := N
nActual:= 0
@ nRow, 40 WHEELMETER aMeter[ 1 ] SIZE 200,200 PIXEL OF oDlg ;
POS nActual RANGE 0, nTotal ;
ANIMACOLOR METRO_AMBER ;
BACKCOLOR METRO_STEEL ;
INNERCOLOR 0x5000ff00 ;
INNERDIA 0.7 ;
TEXT { || "Final : " + cValToChar( nActual ) + CRLF + "Remanente : " + cValToChar( nTotal - nActual ) } ;
FONT oText TEXTCOLOR CLR_WHITE
lAnimate:=.t.
bTimer := <||
if lAnimate
nActual := nAnd( nActual += nAdd, 255 )
AEval( aMeter, { |o| o:SetPos( nActual ) } )
endif
return nil
>
oDlg:bInit := <||
DEFINE TIMER oTimer INTERVAL 150 OF oDlg
oTimer:bAction := bTimer
oTimer:Activate()
return nil
>
if nActual=N
WinExec("Explorer.EXE " + "c:\respaldoMT\")
endif
ACTIVATE DIALOG oDlg CENTERED
return nil
Saluditos

:
Re: New TprogressWheel
Posted: Mon Aug 03, 2020 4:25 am
by nageswaragunupudi
Code: Select all | Expand
#include "fivewin.ch"
function Main()
local cFolderFWH := "c:\fwh\"
local cFolderSRC := cFolderFWH + "samples\"
local cFolderDST := cFolderFWH + "copytest\"
local aFiles := DIRECTORY( cFolderSRC + "*.*" )
local nFiles := Len( aFiles )
local cFiles := LTrim( Str( nFiles ) )
local nFile := 0
local oDlg, oBtn, oMeter, oFont, oBold, oBrush
lMkFullPath( cFolderDST )
DEFINE BRUSH oBrush FILE cFolderFWH + "bitmaps\sea.bmp" RESIZE
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-18
DEFINE FONT oBold NAME "VERDANA" SIZE 0,-20
DEFINE DIALOG oDlg SIZE 300,350 PIXEL TRUEPIXEL FONT oFont BRUSH oBrush ;
TITLE "WHEELMETER"
@ 20,20 BTNBMP oBtn PROMPT { || If( nFile == 0, ;
"Start Copy", If( nFile >= nFiles, "Finished copy", ;
TRANSFORM( nFile*100.0/nFiles, "Copying Files ### %" ) ) ) } ;
SIZE 260,40 PIXEL FONT oBold 2007 CENTER WHEN nFile == 0 UPDATE ;
GRADIENT { || { { nFile/nFiles, CLR_GREEN, CLR_HGREEN }, ;
{ 1 - ( nFile/nFiles ), CLR_LIGHTGRAY, CLR_GRAY }, .F. } }
oBtn:bAction := <|oBtn|
for nFile := 1 to nFiles
COPY FILE ( cFolderSRC + aFiles[ nFile, 1 ] ) TO ( cFolderDST + aFiles[ nFile, 1 ] )
oMeter:SetPos( nFile )
oDlg:Update()
SysRefresh()
next
return nil
>
@ 100,50 WHEELMETER oMeter SIZE 200,200 PIXEL OF oDlg ;
POS nFile RANGE 0, nFiles ;
ANIMACOLOR METRO_AMBER ;
BACKCOLOR METRO_STEEL ;
INNERCOLOR 0x5000ff00 ;
INNERDIA 0.67 ;
TEXT { || "Copied : " + cValToChar( nFile ) + CRLF + "Balance : " + cValToChar( nFiles - nFile ) } ;
FONT oFont TEXTCOLOR CLR_WHITE
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont, oBold
RELEASE BRUSH oBrush
return nil

Note: This sample also demonstrates how to show progress meter on BTNBMP itself.
Re: New TprogressWheel
Posted: Mon Aug 03, 2020 7:48 am
by joseluispalma
Very nice!!!
And reindexing?
Re: New TprogressWheel
Posted: Mon Aug 03, 2020 11:52 am
by nageswaragunupudi
Code: Select all | Expand
nIndexed := 0
@ r,c WHEELMETER oMeter .... POS nIndexed RANGE 0, LASTREC() ...
INDEX ON ..... EVAL { || oMeter:SetPos( nIndexed += 100 ) } EVERY 100 ....
Re: New TprogressWheel
Posted: Tue Aug 04, 2020 3:41 am
by AIDA
Hello, I already tried to make it work automatically without needing the button, but I have not succeeded, what can I do?
nageswaragunupudi wrote:Code: Select all | Expand
#include "fivewin.ch"
function Main()
local cFolderFWH := "c:\fwh\"
local cFolderSRC := cFolderFWH + "samples\"
local cFolderDST := cFolderFWH + "copytest\"
local aFiles := DIRECTORY( cFolderSRC + "*.*" )
local nFiles := Len( aFiles )
local cFiles := LTrim( Str( nFiles ) )
local nFile := 0
local oDlg, oBtn, oMeter, oFont, oBold, oBrush
lMkFullPath( cFolderDST )
DEFINE BRUSH oBrush FILE cFolderFWH + "bitmaps\sea.bmp" RESIZE
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-18
DEFINE FONT oBold NAME "VERDANA" SIZE 0,-20
DEFINE DIALOG oDlg SIZE 300,350 PIXEL TRUEPIXEL FONT oFont BRUSH oBrush ;
TITLE "WHEELMETER"
@ 20,20 BTNBMP oBtn PROMPT { || If( nFile == 0, ;
"Start Copy", If( nFile >= nFiles, "Finished copy", ;
TRANSFORM( nFile*100.0/nFiles, "Copying Files ### %" ) ) ) } ;
SIZE 260,40 PIXEL FONT oBold 2007 CENTER WHEN nFile == 0 UPDATE ;
GRADIENT { || { { nFile/nFiles, CLR_GREEN, CLR_HGREEN }, ;
{ 1 - ( nFile/nFiles ), CLR_LIGHTGRAY, CLR_GRAY }, .F. } }
oBtn:bAction := <|oBtn|
for nFile := 1 to nFiles
COPY FILE ( cFolderSRC + aFiles[ nFile, 1 ] ) TO ( cFolderDST + aFiles[ nFile, 1 ] )
oMeter:SetPos( nFile )
oDlg:Update()
SysRefresh()
next
return nil
>
@ 100,50 WHEELMETER oMeter SIZE 200,200 PIXEL OF oDlg ;
POS nFile RANGE 0, nFiles ;
ANIMACOLOR METRO_AMBER ;
BACKCOLOR METRO_STEEL ;
INNERCOLOR 0x5000ff00 ;
INNERDIA 0.67 ;
TEXT { || "Copied : " + cValToChar( nFile ) + CRLF + "Balance : " + cValToChar( nFiles - nFile ) } ;
FONT oFont TEXTCOLOR CLR_WHITE
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont, oBold
RELEASE BRUSH oBrush
return nil

Note: This sample also demonstrates how to show progress meter on BTNBMP itself.
Re: New TprogressWheel
Posted: Tue Aug 04, 2020 7:23 am
by AIDA
Me auto contesto con oDlg:bStart := {||Eval( oBtn:bAction ),nFile == 0 } puedo ejecutarlo automáticamente
I auto reply with oDlg: bStart: = {|| Eval (oBtn: bAction), nFile == 0} I can run it automatically
AIDA wrote:Hello, I already tried to make it work automatically without needing the button, but I have not succeeded, what can I do?
nageswaragunupudi wrote:Code: Select all | Expand
#include "fivewin.ch"
function Main()
local cFolderFWH := "c:\fwh\"
local cFolderSRC := cFolderFWH + "samples\"
local cFolderDST := cFolderFWH + "copytest\"
local aFiles := DIRECTORY( cFolderSRC + "*.*" )
local nFiles := Len( aFiles )
local cFiles := LTrim( Str( nFiles ) )
local nFile := 0
local oDlg, oBtn, oMeter, oFont, oBold, oBrush
lMkFullPath( cFolderDST )
DEFINE BRUSH oBrush FILE cFolderFWH + "bitmaps\sea.bmp" RESIZE
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-18
DEFINE FONT oBold NAME "VERDANA" SIZE 0,-20
DEFINE DIALOG oDlg SIZE 300,350 PIXEL TRUEPIXEL FONT oFont BRUSH oBrush ;
TITLE "WHEELMETER"
@ 20,20 BTNBMP oBtn PROMPT { || If( nFile == 0, ;
"Start Copy", If( nFile >= nFiles, "Finished copy", ;
TRANSFORM( nFile*100.0/nFiles, "Copying Files ### %" ) ) ) } ;
SIZE 260,40 PIXEL FONT oBold 2007 CENTER WHEN nFile == 0 UPDATE ;
GRADIENT { || { { nFile/nFiles, CLR_GREEN, CLR_HGREEN }, ;
{ 1 - ( nFile/nFiles ), CLR_LIGHTGRAY, CLR_GRAY }, .F. } }
oBtn:bAction := <|oBtn|
for nFile := 1 to nFiles
COPY FILE ( cFolderSRC + aFiles[ nFile, 1 ] ) TO ( cFolderDST + aFiles[ nFile, 1 ] )
oMeter:SetPos( nFile )
oDlg:Update()
SysRefresh()
next
return nil
>
@ 100,50 WHEELMETER oMeter SIZE 200,200 PIXEL OF oDlg ;
POS nFile RANGE 0, nFiles ;
ANIMACOLOR METRO_AMBER ;
BACKCOLOR METRO_STEEL ;
INNERCOLOR 0x5000ff00 ;
INNERDIA 0.67 ;
TEXT { || "Copied : " + cValToChar( nFile ) + CRLF + "Balance : " + cValToChar( nFiles - nFile ) } ;
FONT oFont TEXTCOLOR CLR_WHITE
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont, oBold
RELEASE BRUSH oBrush
return nil

Note: This sample also demonstrates how to show progress meter on BTNBMP itself.
Re: New TprogressWheel
Posted: Tue Aug 04, 2020 9:32 am
by nageswaragunupudi
Autostart and autoclose the meter
Code: Select all | Expand
#include "fivewin.ch"
function Main()
local cFolderFWH := "c:\fwh\"
local cFolderSRC := cFolderFWH + "samples\"
local cFolderDST := cFolderFWH + "copytest\"
local aFiles := DIRECTORY( cFolderSRC + "*.*" )
local nFiles := Len( aFiles )
local cFiles := LTrim( Str( nFiles ) )
local nFile := 0
local oDlg, oBtn, oMeter, oFont, oBold, oBrush
lMkFullPath( cFolderDST )
? "Start copying with circular meter"
DEFINE BRUSH oBrush FILE cFolderFWH + "bitmaps\sea.bmp" RESIZE
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-18
DEFINE FONT oBold NAME "VERDANA" SIZE 0,-20
DEFINE DIALOG oDlg SIZE 300,300 PIXEL TRUEPIXEL FONT oFont BRUSH oBrush ;
TITLE "WHEELMETER"
@ 50,50 WHEELMETER oMeter SIZE 200,200 PIXEL OF oDlg ;
POS nFile RANGE 0, nFiles ;
ANIMACOLOR METRO_AMBER ;
BACKCOLOR METRO_STEEL ;
INNERCOLOR 0x5000ff00 ;
INNERDIA 0.67 ;
TEXT { || "Copied : " + cValToChar( nFile ) + CRLF + "Balance : " + cValToChar( nFiles - nFile ) } ;
FONT oFont TEXTCOLOR CLR_WHITE
oDlg:bStart := <||
for nFile := 1 to nFiles
COPY FILE ( cFolderSRC + aFiles[ nFile, 1 ] ) TO ( cFolderDST + aFiles[ nFile, 1 ] )
oMeter:SetPos( nFile )
SysRefresh()
next
oDlg:End()
return nil
>
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont, oBold
RELEASE BRUSH oBrush
? "Copied all files"
return nil