Code: Select all
#include "FiveWin.ch"
STATIC oWnd
FUNCTION Main()
LOCAL oBar
DEFINE WINDOW oWnd TITLE "Bilhões de dolares"
DEFINE BUTTONBAR oBar _3D OF oWnd
DEFINE BUTTON OF oBar ACTION( BILHOES_DOLAR() )
SET MESSAGE OF oWnd TO "Bilhões de dolares" NOINSET CLOCK DATE KEYBOARD
ACTIVATE WINDOW oWnd CENTERED
RETURN NIL
FUNCTION BILHOES_DOLAR()
LOCAL oDlg
LOCAL oGet1, oGet2, oGet3, oGet4
LOCAL cVar1, cVar2, cVar3, cVar4
LOCAL nMilhoes1 := "111.111.111"
LOCAL nMilhoes2 := "111.111.111"
LOCAL nMultiplica := 0.00
LOCAL nResultado := 0.00
oGet1 := SPACE(50)
cVar1 := 0.00
nMultiplica := VAL( nMilhoes1 ) * VAL( nMilhoes2 )
nResultado := nResultado + nMultiplica
cVar1 := nResultado
DEFINE DIALOG oDlg TITLE "From Code" PIXEL SIZE 500, 300
@ 10,10 GET oGet1 VAR cVar1 OF oDlg PIXEL SIZE 150,12 ;
PICTURE "@K 999999.999999" BITMAP "..\bitmaps\on.bmp" ;
ACTION( msginfo( "FiveWin Power" ) ) CENTER
oGet1:lBtnTransparent := .T.
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL