This?
#include "fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL nMin := 1
LOCAL nMax := 9
LOCAL oGet, nGet := 1
DEFINE DIALOG oDlg
@ 1 , 1 GET oGet VAR nGet OF oDlg ;
PICTURE "9" ;
SPINNER ;
ON UP cambiaspin( oGet , -1 , nMin , nMax ) ;
ON DOWN cambiaspin( oGet , +1 , nMin , nMax ) ;
VALID ( nGet >= nMin .AND. nGet <= nMax )
ACTIVATE DIALOG oDlg CENTER
RETURN NIL
FUNCTION CAMBIASPIN( oGet , nStep , nMin , nMax )
LOCAL nRitorna := oget:varget()
LOCAL nOriginal := nRitorna
nRitorna := nRitorna + nStep
IF nRitorna >= nMin .AND. nRitorna <= nMax
oGet:varput( nRitorna)
oGet:refresh()
ENDIF
RETURN NIL