New TprogressWheel

Re: New TprogressWheel

Postby Jiloilo » Tue Jul 06, 2021 8:20 pm

Hello.

Thanks for the help. It works now =).
i have one question:
Its not posible to run this meter:

https://postimg.cc/z3GzKhXT
Image
With the actual version?.
If its possible, can someone help me with a sample
Jiloilo
 
Posts: 9
Joined: Thu Jul 01, 2021 6:20 pm

Re: New TprogressWheel

Postby leandro » Tue Jul 06, 2021 10:27 pm

Me uno a la conversación :D

Alguien tiene un ejemplo de uso de un WHEELMETER usando la clausula lIndefinite

De antemano gracias
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1669
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: New TprogressWheel

Postby Silvio.Falconi » Wed Jul 07, 2021 7:25 am

Jiloilo wrote:Hello.

Thanks for the help. It works now =).
i have one question:
Its not posible to run this meter:

https://postimg.cc/z3GzKhXT
Image
With the actual version?.
If its possible, can someone help me with a sample


yes you can do it
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: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: New TprogressWheel

Postby Jiloilo » Thu Jul 08, 2021 1:44 am

Silvio.Falconi wrote:
Jiloilo wrote:Hello.

Thanks for the help. It works now =).
i have one question:
Its not posible to run this meter:

https://postimg.cc/z3GzKhXT
Image
With the actual version?.
If its possible, can someone help me with a sample


yes you can do it


Ok, but can you give me a sample . If it has a cost, can you send me the price to this email:
jesusdelamora@ciberpaq.com.mx
Jiloilo
 
Posts: 9
Joined: Thu Jul 01, 2021 6:20 pm

Re: New TprogressWheel

Postby leandro » Thu Jul 08, 2021 8:45 am

Amigo Jiloilo, basándome en samples\meterwh.prg, cree este ejemplo, espero te sirva.

Code: Select all  Expand view


#include "fivewin.ch"

// ProgressWheel class FWH 1908

//----------------------------------------------------------------------------//

function Main()

   local oDlg, oFont, oText
   local nActual := 0, nTotal := 255
   Local oMeter
   Local nGris :=  rgb(41,41,41)

   DEFINE FONT  oFont  NAME "Calibri" SIZE 0,-20 BOLD
   DEFINE FONT  oText  NAME "Calibri" SIZE 0,-18

   DEFINE DIALOG oDlg SIZE 740,400 PIXEL TRUEPIXEL ;
      FONT oFont  COLORS CLR_WHITE,nGris;
      TITLE "PROGRESS WHEEL CLASS : " + FWVERSION

   @ 120, 240 WHEELMETER oMeter SIZE 200,200 PIXEL OF oDlg ;
      POS nActual RANGE 0, nTotal ;
      ANIMACOLOR CLR_WHITE ;
      BACKCOLOR  nGris ;
      INNERCOLOR nGris ;
      INNERDIA 0.7

   oDlg:bInit  := <||
        oMeter:Indefinite(.T.)
      >
   
   oDlg:bPainted := <|hDC|
      local nRow  := 0
      oDlg:SayText( "Procesando...", { nRow,  40, nRow +70, 640 }, "B", oText, CLR_WHITE )
      return nil
      >

    oDlg:nOpacity    := 500

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont, oText

return nil

//----------------------------------------------------------------------------//
 


Image
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1669
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: New TprogressWheel

Postby leandro » Thu Jul 08, 2021 9:05 am

Amigos con base en este ejemplo que cree, me surge una idea, me gustaría colocar ese meter en movimiento, sobrepuesto cuando estoy corriendo algún proceso largo en la aplicación. ¿Cómo hago para que ese dialogo se pinte cubriendo toda la ventana principal de la aplicación?, Algo similar a lo que se muestra en la imagen.

Image

Espero haberme hecho entender, de antemano gracias.
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1669
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: New TprogressWheel

Postby Jiloilo » Thu Jul 08, 2021 4:11 pm

leandro wrote:Amigo Jiloilo, basándome en samples\meterwh.prg, cree este ejemplo, espero te sirva.

Code: Select all  Expand view


#include "fivewin.ch"

// ProgressWheel class FWH 1908

//----------------------------------------------------------------------------//

function Main()

   local oDlg, oFont, oText
   local nActual := 0, nTotal := 255
   Local oMeter
   Local nGris :=  rgb(41,41,41)

   DEFINE FONT  oFont  NAME "Calibri" SIZE 0,-20 BOLD
   DEFINE FONT  oText  NAME "Calibri" SIZE 0,-18

   DEFINE DIALOG oDlg SIZE 740,400 PIXEL TRUEPIXEL ;
      FONT oFont  COLORS CLR_WHITE,nGris;
      TITLE "PROGRESS WHEEL CLASS : " + FWVERSION

   @ 120, 240 WHEELMETER oMeter SIZE 200,200 PIXEL OF oDlg ;
      POS nActual RANGE 0, nTotal ;
      ANIMACOLOR CLR_WHITE ;
      BACKCOLOR  nGris ;
      INNERCOLOR nGris ;
      INNERDIA 0.7

   oDlg:bInit  := <||
        oMeter:Indefinite(.T.)
      >
   
   oDlg:bPainted := <|hDC|
      local nRow  := 0
      oDlg:SayText( "Procesando...", { nRow,  40, nRow +70, 640 }, "B", oText, CLR_WHITE )
      return nil
      >

    oDlg:nOpacity    := 500

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont, oText

return nil

//----------------------------------------------------------------------------//
 


Image

Asi es. Muchas gracias =)
Jiloilo
 
Posts: 9
Joined: Thu Jul 01, 2021 6:20 pm

Re: New TprogressWheel

Postby leandro » Mon Jul 12, 2021 12:38 am

Aquí les dejo el código del efecto que quería lograr.

Espero sea de utilidad

Image

Code: Select all  Expand view

#include "FiveWin.ch"

static oWnd
static oDlg
static aCoor
static oWndChild, oBrw
static cAlias

//----------------------------------------------------------------------------//

function Main()
    Local oBar

   DEFINE WINDOW oWnd TITLE "Probando Iniciar Dialogo En Posicion 0,0" ;
    MDI ;
    MENU BuildMenu()

    SET MESSAGE OF oWnd TO "Main Window" 2015

    oWnd:bInit = { || CustomerBrowse(),progreso(oWnd,.F.) }

   ACTIVATE WINDOW oWnd

return nil

//----------------------------------------------------------------------------//

function BuildMenu()

   local oMenu

   MENU oMenu
      MENUITEM "&Information"
      MENU
         MENUITEM "Abrir" ACTION progreso(oWnd)
         SEPARATOR
         MENUITEM "Cerrar" ACTION oDlg:End()
      ENDMENU

   ENDMENU

return oMenu

STATIC FUNCTION progreso(oVnt,lMod,lInde)

    Local nTopR := 0
    Local nLeftR := 0
    Local nGris :=  rgb(25,25,25)
    Local nActual := 0, nTotal := 255
    Local oMeter,oText,oTxt
    Local cbInicia
    Local cbAjusta
    Local cTxt := "Procesando ..."
   
    DEFAULT lMod := .F.
    DEFAULT lInde := .T.

    DEFINE FONT oText NAME "Calibri" SIZE 0,-22 BOLD

    DEFINE DIALOG oDlg FROM nTopR, nLeftR TO nTopR + 54, nLeftR + 70 PIXEL TRUEPIXEL ;
            STYLE nOr(WS_POPUP,WS_BORDER) OF oVnt COLORS CLR_WHITE,nGris

    @ 140, 240 WHEELMETER oMeter SIZE 200,200 PIXEL OF oDlg ;
        POS nActual RANGE 0, nTotal ;
        ANIMACOLOR CLR_WHITE ;
        BACKCOLOR  nGris ;
        INNERCOLOR nGris ;
        INNERDIA 0.7 ;
        FONT oText

    @ 60 , 0 SAY oTxt VAR cTxt SIZE 20 , 22 PIXEL OF oDlg UPDATE FONT oText COLORS CLR_WHITE,nGris CENTER

    cbInicia  := <||
            Local nTopR := 0
            Local nLeftR := 0
            aCoor := ClientToScreen( oVnt:hWnd, { nTopR, nLeftR } )
            oDlg:nWidth := oVnt:nWidth - ( GetSysMetrics( 32 ) * 2 )
            oDlg:nHeight := oVnt:nHeight - ( GetSysMetrics( 15 ) + GetSysMetrics( 4 ) + ( GetSysMetrics( 33 ) * 2 ) + oVnt:oMsgBar:nHeight )
            oDlg:setpos(aCoor[1],aCoor[2]) 
            oMeter:nLeft := ( oDlg:nWidth - oMeter:nWidth ) / 2
            oTxt:nWidth := oDlg:nWidth
            return nil
        >
   
    oDlg:bStart = { || EVAL(cbInicia) }

    if lInde
        oDlg:bInit  := <||
            oMeter:Indefinite(.T.)
          >
    endif

    oDlg:nOpacity    := 400
    oDlg:lModal := lMod
   
    cbAjusta := <||
            Local nTopR := oDlg:nTop
            Local nLeftR := oDlg:nLeft
            aCoor := ClientToScreen( oVnt:hWnd, { nTopR, nLeftR } ) 
            oDlg:nWidth := oVnt:nWidth - ( GetSysMetrics( 32 ) * 2 )
            oDlg:nHeight := oVnt:nHeight - ( GetSysMetrics( 15 ) + GetSysMetrics( 4 ) + ( GetSysMetrics( 33 ) * 2 ) + oVnt:oMsgBar:nHeight )
            oDlg:setpos(aCoor[1],aCoor[2]) 
            oMeter:nLeft := ( oDlg:nWidth - oMeter:nWidth ) / 2
            oTxt:nWidth := oDlg:nWidth
            return nil
    >
   
    oVnt:bMoved  := <||
            EVAL(cbAjusta)
        >  
   
    oVnt:bResized  := <||
            EVAL(cbAjusta)
        >   
       
    ACTIVATE DIALOG oDlg

return .t.

//----------------------------------------------------------------------------//

function CustomerBrowse()
   USE Customer NEW ALIAS ( cAlias := GetNewAlias( "CUST" ) ) SHARED

   DEFINE WINDOW oWndChild MDICHILD TITLE Alias()
   
    SET MESSAGE OF oWndChild TO "Child Window" 2015  

   @ 0, 0 LISTBOX oBrw ;
      FIELDS  ( cAlias )->First, ( cAlias )->Last ;
      HEADERS "First",           "Last"

   oWndChild:SetControl( oBrw )

   ACTIVATE WINDOW oWndChild MAXIMIZED;
      VALID oBrw:lCloseArea()

return nil

//----------------------------------------------------------------------------//

function GetNewAlias( cDbfName )

   static n := 0

return cDbfName + StrZero( ++n, 2 )

//----------------------------------------------------------------------------//


 
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1669
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: New TprogressWheel

Postby Silvio.Falconi » Mon Jul 12, 2021 8:56 am

Sorry ,
I not understood which is the problem
do you saw the sample test fwteam published ?
Last edited by Silvio.Falconi on Tue Jul 13, 2021 7:01 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: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: New TprogressWheel

Postby Cgallegoa » Tue Jul 13, 2021 2:26 am

Leandro, excelente.

Gracias. :)
Saludos,

Carlos Gallego

*** FWH-24.07, xHarbour 1.3.1 Build 20240624, Borland C++7.70, PellesC ***
Cgallegoa
 
Posts: 491
Joined: Sun Oct 16, 2005 3:32 am
Location: Quito - Ecuador

Re: New TprogressWheel

Postby Silvio.Falconi » Tue Jul 13, 2021 7:04 am

Cgallegoa wrote:Leandro, excelente.

Gracias. :)



Leandro ????????

I am the creator of TprogressWheel class together with Antonino Perricone, Leandro is not the creator of the class !!!!

there is an exhaustive example in the fwh \ sample folder

I didn't understand what you want to prove


leandro's example creates a child with customer, dbf and with the gray wheel class always spinning, what's the use?

i am ignorant i really don't understand the logical sense of leandro's test

if you wish insert a whhel on xbrowse


Image


Code: Select all  Expand view
function MeterInBackGround()

   local oDlg, oFont, oBrwFont, oBrush, oBrw

   USE STATES SHARED VIA "DBFCDX"

   DEFINE BRUSH oBrush FILE "..\bitmaps\backgrnd\paper2.bmp"
   DEFINE FONT oBrwFont NAME "CALIBRI" SIZE 0,-16 BOLD
   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 400,600 PIXEL TRUEPIXEL ;
      FONT oFont TITLE "CIRCULAR METER INSIDE BROWSE"

   @ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE "STATES" AUTOCOLS CELL LINES ;
      NOBORDER FONT oBrwFont

   WITH OBJECT oBrw
      :lTransparent  := .t.
      :nStretchCol   := STRETCHCOL_WIDEST
      :bPaintBack     := <||
         FillRect( oBrw:GetDC(), GetClientRect( oBrw:hWnd ), oBrush:hBrush )
         PaintCircularMeter( oBrw, {130,30,430,330}, 0.5, oBrw:KeyNo, oBrw:nLen, ;
            { 0x6000ff00, 0x60FA6800 } )
         oBrw:ReleaseDC()
         return nil
         >

      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont, oBrwFont
   RELEASE BRUSH oBrush

   CLOSE DATA

return nil
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: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: New TprogressWheel

Postby Silvio.Falconi » Tue Jul 13, 2021 7:17 am

Jiloilo wrote:
Silvio.Falconi wrote:New Release With Gradient
Image


Hello, can i have this source code of this sample. thanks =)


this test sample is not released, I made it to test the class for all commands simultaneously
it use our private library I not released too
Please to use the class see the sample of folder sample of fwh
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: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: New TprogressWheel

Postby Cgallegoa » Wed Jul 14, 2021 12:20 am

Silvio,

Ok man, congratulations to you and Antonino Perricone for your class, it's excellent, and congratulations also to Leandro for a good example.

Sorry, i didn't mean to bother you.

Take it easy, don´t worry, be happy. :-)
Saludos,

Carlos Gallego

*** FWH-24.07, xHarbour 1.3.1 Build 20240624, Borland C++7.70, PellesC ***
Cgallegoa
 
Posts: 491
Joined: Sun Oct 16, 2005 3:32 am
Location: Quito - Ecuador

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

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