CrAzY hOuSe
Locos por la programación
Obtener el símbolo monetario existente en la configuración regional de Windows
.net

Syndication

Inicia un nuevo proyecto, pega el siguiente código en la sección «Declaraciones» y ejecútalo, te mostrara en un MsgBox el Símbolo monetario.

Option Explicit On
Private Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" (ByVal Locale As Long, _ ByVal LCType As Long, ByVal lpLCData As String, ByVal cchData As Long) As Long 
Private Const LOCALE_SCURRENCY = &H14
' Constante para el símbolo monetario 
Private Const LOCALE_USER_DEFAULT = &H400
Private Sub Form_Load()
    Dim sBuffer As String Dim dl As Long ' Area intermedia dónde se cargará la información 
    sBuffer = String$(100, vbNullChar)
    ' La función devolverá la cantidad de caracteres 
    ' cargados en el área intermedia. Cero, en caso 
    ' de error. 
    dl = GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SCURRENCY, sBuffer, 100)
    If dl <> 0 Then MsgBox(Left(sBuffer, dl - 1))
End Sub

Publicado en microsoft.public.es.vb por Softjaen


Posted lun, dic 2 2002 15:48 by Maverick
Filed under: , ,

Comments

Prudence wrote re: Obtener el símbolo monetario existente en la configuración regional de Windows
on jue, oct 27 2011 19:01

This piece was a lifejacket that saved me from dronwnig.

Add a Comment

(optional)  
(optional)
(required)  
Remember Me?
MavericK
Powered by Community Server (Non-Commercial Edition), by Telligent Systems