Hello.
Thanks for the help. It works now =).
i have one question:
Its not posible to run this meter:
https://postimg.cc/z3GzKhXT
With the actual version?.
If its possible, can someone help me with a sample
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
With the actual version?.
If its possible, can someone help me with a sample
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
With the actual version?.
If its possible, can someone help me with a sample
yes you can do it
#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
//----------------------------------------------------------------------------//
leandro wrote:Amigo Jiloilo, basándome en samples\meterwh.prg, cree este ejemplo, espero te sirva.
- Code: Select all Expand view RUN
#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
//----------------------------------------------------------------------------//
#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 )
//----------------------------------------------------------------------------//
Cgallegoa wrote:Leandro, excelente.
Gracias.
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
Jiloilo wrote:Silvio.Falconi wrote:New Release With Gradient
Hello, can i have this source code of this sample. thanks =)
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 47 guests