ATOUTFOX
COMMUNAUTÉ FRANCOPHONE DES PROFESSIONNELS FOXPRO
Visual FoxPro : le développement durable

Forum AtoutFox : Re: SET POINT TO   

Sujet

rss Flux RSS des derniers messages

Vous devez vous identifier pour pouvoir poser une question ou répondre.

sam. 15 juin 2013, 17h30

Francis Faure
France France

atoutfox.public.association

Re: SET POINT TO

Oui et Merci Gregory

mais
je cherchais une simple fonction vfp

j'avais imaginé :

Clear
Set Sysformats Off
Set Point To "."
Set Century Off
Set Currency Left
Set Currency To "$"
Set Date AMERICAN
Set Decimals To 3
Set Hours To 12
Set Mark To "-"
Set Separator To "."


=Debug_List_Sets("Sets modifiés dans VFP")

o=Createobject("Windows_SYS_FORMATS")
? "-> Valeur recherchée le SET POINT de Windows = ", Set("point")
=Debug_List_Sets("Sets de Windows...")
o=Null

=Debug_List_Sets("Fin")


Procedure Debug_List_Sets(lcLib)
  ?
  ? "SYSFORMATS actuels ("+m.lcLib+")"
  ? "------------------------"
  ? "SET CENTURY ", Set("century")
  ? "SET CURRENCY ", Set("currency")
  ? "SET CURRENCY TO", Set("currency",1)
  ? "SET DATE", Set("date")
  ? "SET DECIMALS TO", Set("decimals")
  ? "SET HOURS TO", Set("hours")
  ? "SET MARK TO", Set("mark")
  ? "SET POINT TO", Set("point")
  ? "SET SEPARATOR TO", Set("separator")
  ? "Exemple:"
  ? PI(), Str(3.14,8,2), Date(), Time(), Transform(1234.56,"@$ 999,999.99")
Endproc


Define Class Windows_SYS_FORMATS As Custom
  cSET_SYSFORMATS=Set("sysformats")

  cSET_CENTURY_ON_OFF=Set("CENTURY")
  cSET_CURRENCY_LEFT_RIGHT=Set("CURRENCY")
  cSET_CURRENCY_TO=Set("CURRENCY",1)
  cSET_DATE_TO=Set("DATE")
  nSET_DECIMALS_TO=Set("DECIMALS")
  nSET_HOURS_TO=Set("HOURS")
  cSET_MARK_TO=Set("MARK")
  cSET_POINT_TO=Set("POINT")
  cSET_SEPARATOR_TO=Set("SEPARATOR")

  Procedure Init()
    DoDefault()
    * load windows settings
    Set Sysformats On && attention : ici set date est forcée à SHORT
  Endproc
  Procedure Destroy()
    * restore
    Local cSet
    cSet=This.cSET_SYSFORMATS
    Set Sysformats &cSet
    cSet=This.cSET_CENTURY_ON_OFF
    Set Century &cSet
    cSet=This.cSET_CURRENCY_LEFT_RIGHT
    Set Currency &cSet
    Set Currency To (This.cSET_CURRENCY_TO)
    Set Date To (This.cSET_DATE_TO)
    Set Decimals To (This.nSET_DECIMALS_TO)
    Set Hours To (This.nSET_HOURS_TO)
    Set Mark To (This.cSET_MARK_TO)
    Set Point To (This.cSET_POINT_TO)
    Set Separator To (This.cSET_SEPARATOR_TO)
    DoDefault()
  Endproc
Enddefine


J'ai besoin de connaitre le paramétrage de Windows car dans le cas d'un appel word en publipostage : le formatage de Windows utilisé est celui de Windows

cordialement
Francis

Permalink : http://www.atoutfox.org/nntp.asp?ID=0000012146
20 286 messages dans le forum • Liste complète des messages

www.atoutfox.org - Site de la Communauté Francophone des Professionnels FoxPro - v3.4.0 - © 2004-2026.
Cette page est générée par un composant COM+ développé en Visual FoxPro 9.0-SP2-HF3