local oMetro
DEFINE METRO oMetro ;
TITLE "My FWH Metro app" ;
BACKGROUND "..\bitmaps\hires\earth.bmp"
while ! Eof()
DEFINE METROBUTTON OF oMetro ;
PROMPT FieldGet( 1 ) COLOR CLR_WHITE, RGB( 2, 174, 224 ) ; // 1 primer campo
IMAGE "..\bitmaps\metro\files.bmp" ;
ACTION Records()
DbSkip()
end
#xcommand DEFINE METROBUTTON [<oBtn>] ;
[ PROMPT <cPrompt> ] ;
[ COLOR <nClrText>, <nClrPane> ] ;
[ IMAGE <cImgName> ] ;
[ OF <oMetro> ] ;
[ <large: LARGE> ] ;
[ ACTION <uAction,...> ] ;
=> ;
[ <oBtn> := ] <oMetro>:AddButton( <cPrompt>, <nClrText>, <nClrPane>,;
<.large.>, <cImgName>, [{| Self |<uAction>}] )
local oMetro, oBtn
DEFINE METRO oMetro ;
TITLE "My FWH Metro app" ;
BACKGROUND "..\bitmaps\hires\earth.bmp"
while ! Eof()
DEFINE METROBUTTON oBtn OF oMetro ;
PROMPT FieldGet( 1 ) COLOR CLR_WHITE, RGB( 2, 174, 224 ) ; // 1 primer campo
IMAGE "..\bitmaps\metro\files.bmp" ;
ACTION ShowRecords( ::Cargo )
oBtn:Cargo = RecNo()
DbSkip()
end
// FiveWin - Windows 8 Metro look
#ifndef _METRO_CH
#define _METRO_CH
//----------------------------------------------------------------------------//
#xcommand DEFINE METRO <oMtr> ;
[ BACKGROUND <cFileName> ] ;
[ BTNSIZE <nBtnWidth>, <nBtnHeight> ] ;
[ TITLE <cTitle> ] ;
=> ;
<oMtr> := TMetro():New( <cTitle>, <nBtnWidth>, <nBtnHeight>, <cFileName> )
xcommand DEFINE METROBUTTON [<oBtn>] ;
[ PROMPT <cPrompt> ] ;
[ COLOR <nClrText>, <nClrPane> ] ;
[ IMAGE <cImgName> ] ;
[ OF <oMetro> ] ;
[ <large: LARGE> ] ;
[ ACTION <uAction,...> ] ;
=> ;
[ <oBtn> := ] <oMetro>:AddButton( <cPrompt>, <nClrText>, <nClrPane>,;
<.large.>, <cImgName>, [{| Self |<uAction>}] )
#xcommand ACTIVATE METRO <oMtr> => <oMtr>:Activate()
//----------------------------------------------------------------------------//
#endif
DEFINE METRO oMetro ;
TITLE "My FWH Metro app" ;
BACKGROUND "..\bitmaps\hires\earth.bmp"
DBSELECTAREA( 1 )
NET_USE ("F_REG.DBF", 3,.T.)
while ! Eof()
DEFINE METROBUTTON oBtn OF oMetro ;
PROMPT FieldGet( 1 ) COLOR CLR_WHITE, RGB( 2, 174, 224 ) ; // 1 primer campo
IMAGE "..\bitmaps\metro\files.bmp" ;
ACTION ShowRecords( ::Cargo )
oBtn:Cargo = RecNo()
DbSkip()
end
DEFINE METROBUTTON OF oMetro ;
PROMPT "Exit" COLOR CLR_WHITE, RGB( 2, 174, 224 ) ;
IMAGE "..\bitmaps\metro\exit.bmp" ;
ACTION If( MsgYesNo( "Want to exit ?" ), oMetro:End(),)
ACTIVATE METRO oMetro
oMetro := TMetro():New( "My FWH Metro app",,, "..\bitmaps\hires\earth.bmp" )
DBSELECTAREA( 1 )
NET_USE ("F_REG.DBF", 3,.T.)
DBGOTOP()
while ! Eof()
oBtn := oMetro:AddButton( FieldGet( 1 ), 16777215, ( 2 + ( 174 * 256 ) + ( 224 * 65536 ) ), .F., "..\bitmaps\metro\files.bmp", {||ShowRecords(::Cargo )} )
oBtn:Cargo :=RecNo()
DbSkip()
end
oMetro:AddButton( "Exit", 16777215, ( 2 + ( 174 * 256 ) + ( 224 * 65536 ) ), .F., "..\bitmaps\metro\exit.bmp", {||If( MsgYesNo( "Want to exit ?" ), oMetro:End(),)} )
oMetro:Activate()
oMetro := TMetro():New( "My FWH Metro app",,, "..\bitmaps\hires\earth.bmp" )
DBSELECTAREA( 1 )
NET_USE ("F_REG.DBF", 3,.T.)
DBGOTOP()
while ! Eof()
oBtn := oMetro:AddButton( FieldGet( 1 ), 16777215, ( 2 + ( 174 * 256 ) + ( 224 * 65536 ) ), .F., "..\bitmaps\metro\files.bmp", {| Self |ShowRecords(::Cargo )} )
oBtn:Cargo :=RecNo()
DbSkip()
end
oMetro:AddButton( "Exit", 16777215, ( 2 + ( 174 * 256 ) + ( 224 * 65536 ) ), .F., "..\bitmaps\metro\exit.bmp", {| Self |If( MsgYesNo( "Want to exit ?" ), oMetro:End(),)} )
oMetro:Activate()
while ! Eof()
oBtn := oMetro:AddButton( FieldGet( 1 ), 16777215, ( 2 + ( 174 * 256 ) + ( 224 * 65536 ) ), .F., "..\bitmaps\metro\files.bmp", {| Self |ShowRecords(::Cargo )} )
MsgInfo( ValType( oBtn ) )
oBtn:Cargo :=RecNo()
DbSkip()
end
FUNCTION TESTEPRODU( oFld, _Folder, oPRODU, _LETRA, _INIPROD, _FIMPROD )
MEMVAR OCTL, _oProdu
PUBLIC WPRODFOCO
oCtl := oFld:aDialogs[_Folder]:oCtlFocus()
WHILE _INIPROD <= _FIMPROD
SYSREFRESH()
_oProdu := oProdu+STRZERO(_INIPROD,2,0)+_LETRA
IF (oCtl:hWnd = &_oProdu:hWnd)
WPRODFOCO := _INIPROD
EXIT
ENDIF
_INIPROD = _INIPROD + 1
ENDDO
RETURN( .T. )
Return to All products support
Users browsing this forum: No registered users and 9 guests