New TprogressWheel

Re: New TprogressWheel

Postby Silvio.Falconi » Thu Sep 12, 2019 5:31 pm

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 ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7070
Joined: Thu Oct 18, 2012 7:17 pm

Re: New TprogressWheel

Postby ukoenig » Thu Sep 12, 2019 5:54 pm

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
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: New TprogressWheel

Postby Silvio.Falconi » Fri Sep 13, 2019 8:35 am

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 to scan 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.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7070
Joined: Thu Oct 18, 2012 7:17 pm

Re: New TprogressWheel

Postby Silvio.Falconi » Fri Sep 13, 2019 8:44 am

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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7070
Joined: Thu Oct 18, 2012 7:17 pm

Re: New TprogressWheel

Postby ukoenig » Fri Sep 13, 2019 8:45 am

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
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: New TprogressWheel

Postby Silvio.Falconi » Fri Sep 13, 2019 8:47 am

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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7070
Joined: Thu Oct 18, 2012 7:17 pm

Re: New TprogressWheel

Postby AIDA » Sun Aug 02, 2020 3:44 am

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
AIDA
 
Posts: 879
Joined: Fri Jan 12, 2007 8:35 pm

Re: New TprogressWheel

Postby nageswaragunupudi » Sun Aug 02, 2020 6:09 am

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: New TprogressWheel

Postby AIDA » Sun Aug 02, 2020 7:16 am

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  Expand view  RUN
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
AIDA
 
Posts: 879
Joined: Fri Jan 12, 2007 8:35 pm

Re: New TprogressWheel

Postby nageswaragunupudi » Mon Aug 03, 2020 4:25 am

Code: Select all  Expand view  RUN
#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
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: New TprogressWheel

Postby joseluispalma » Mon Aug 03, 2020 7:48 am

Very nice!!!

And reindexing?
joseluispalma
 
Posts: 109
Joined: Mon Apr 30, 2012 9:10 am

Re: New TprogressWheel

Postby nageswaragunupudi » Mon Aug 03, 2020 11:52 am

Code: Select all  Expand view  RUN
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
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: New TprogressWheel

Postby AIDA » Tue Aug 04, 2020 3:41 am

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 view  RUN
#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: 879
Joined: Fri Jan 12, 2007 8:35 pm

Re: New TprogressWheel

Postby AIDA » Tue Aug 04, 2020 7:23 am

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  Expand view  RUN
#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: 879
Joined: Fri Jan 12, 2007 8:35 pm

Re: New TprogressWheel

Postby nageswaragunupudi » Tue Aug 04, 2020 9:32 am

Autostart and autoclose the meter
Code: Select all  Expand view  RUN
#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
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 45 guests