New TprogressWheel

User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: New TprogressWheel

Post 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. :roll:

regards
Uwe :D
sound ....what's mean ?
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: New TprogressWheel

Post by ukoenig »

Silvio,

I mean playing optional a wav-file during a selected process.
I will add this option.

regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: New TprogressWheel

Post by Silvio.Falconi »

ukoenig wrote:Silvio,

I mean playing optional a wav-file during a selected process.
I will add this option.

regards
Uwe :D
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 _ every position? you can insert a sound for each oProgress:nposition
Last edited by Silvio.Falconi on Fri Sep 13, 2019 8:46 am, edited 1 time in total.
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: New TprogressWheel

Post 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
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: New TprogressWheel

Post by ukoenig »

Silvio,

I mean just a background-sound during the process ( message ).

regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: New TprogressWheel

Post 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
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
AIDA
Posts: 782
Joined: Fri Jan 12, 2007 8:35 pm

Re: New TprogressWheel

Post by AIDA »

Estan muy bonitos :D
Last edited by AIDA on Sun Aug 02, 2020 7:12 am, edited 1 time in total.
Que es mejor que programar? creo que nada :)
Atropellada pero aqui ando :P

I love Fivewin

séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: New TprogressWheel

Post by nageswaragunupudi »

Works with harbour/xharbour 32/64 bits, bcc/msvc/gcc
Regards

G. N. Rao.
Hyderabad, India
User avatar
AIDA
Posts: 782
Joined: Fri Jan 12, 2007 8:35 pm

Re: New TprogressWheel

Post by AIDA »

nageswaragunupudi wrote:Works with harbour/xharbour 32/64 bits, bcc/msvc/gcc
si ya vi los ejemplos :mrgreen:

pero a un no se como usarlo no deja de girar :roll: :lol:

me pueden orientar :mrgreen:


if i already saw the examples :mrgreen:

but I don't know how to use it, it doesn't stop spinning :lol: :lol:

can guide me

Image

Code: Select all

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 :wink::
Last edited by AIDA on Sun Aug 02, 2020 7:54 am, edited 1 time in total.
Que es mejor que programar? creo que nada :)
Atropellada pero aqui ando :P

I love Fivewin

séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: New TprogressWheel

Post by nageswaragunupudi »

Code: Select all

#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
Image

Note: This sample also demonstrates how to show progress meter on BTNBMP itself.
Regards

G. N. Rao.
Hyderabad, India
joseluispalma
Posts: 93
Joined: Mon Apr 30, 2012 9:10 am

Re: New TprogressWheel

Post by joseluispalma »

Very nice!!!

And reindexing?
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: New TprogressWheel

Post by nageswaragunupudi »

Code: Select all

nIndexed := 0

@ r,c WHEELMETER oMeter .... POS nIndexed RANGE 0, LASTREC() ...

INDEX ON ..... EVAL { || oMeter:SetPos( nIndexed += 100 ) } EVERY 100 ....
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
AIDA
Posts: 782
Joined: Fri Jan 12, 2007 8:35 pm

Re: New TprogressWheel

Post 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

#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
Image

Note: This sample also demonstrates how to show progress meter on BTNBMP itself.
Que es mejor que programar? creo que nada :)
Atropellada pero aqui ando :P

I love Fivewin

séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ
User avatar
AIDA
Posts: 782
Joined: Fri Jan 12, 2007 8:35 pm

Re: New TprogressWheel

Post by AIDA »

Me auto contesto con oDlg:bStart := {||Eval( oBtn:bAction ),nFile == 0 } puedo ejecutarlo automáticamente :mrgreen:


I auto reply with oDlg: bStart: = {|| Eval (oBtn: bAction), nFile == 0} I can run it automatically :mrgreen:

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

#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
Image

Note: This sample also demonstrates how to show progress meter on BTNBMP itself.
Que es mejor que programar? creo que nada :)
Atropellada pero aqui ando :P

I love Fivewin

séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: New TprogressWheel

Post by nageswaragunupudi »

Autostart and autoclose the meter

Code: Select all

#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
Regards

G. N. Rao.
Hyderabad, India
Post Reply