Article View: pl.comp.lang.vbasic
Article #92603Re: [VB6] kropka, przecinek i IsNumeric
From: Robert Kurzawa
Date: Fri, 04 Nov 2005 14:48
Date: Fri, 04 Nov 2005 14:48
42 lines
2088 bytes
2088 bytes
Użytkownik "Junga" <jungaWYTNIJTO@wp.pl> napisał w wiadomości
news:dkfp6p$g59$1@nemesis.news.tpi.pl...
> A jak programowo sprawdzić jaki separator użyty jest w systemie.
Użyj funkcji API: GetLocaleInfo.
Poniżej przykład (bez obsługi błędów):
'<CODE>
'## Deklaracje
Private Const LOCALE_USER_DEFAULT As Long = &H400
Private Const LOCALE_SDECIMAL As Long = &HE
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
'## Funkcja
Private Function GetDecSeparator() As String
Dim sReturn As String
Dim lSepLen As Long
sReturn = Space$(2)
lSepLen = GetLocaleInfo(LOCALE_USER_DEFAULT, _
LOCALE_SDECIMAL, _
sReturn, Len(sReturn))
If lSepLen Then
GetDecSeparator = Left$(sReturn, 1)
End If
End Function
'</CODE>
Robert
Technical Details
Message-ID:
<dkfsd3$209$1@news.onet.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.onet.pl!not-for-mailReferences:
<dkdvj4$6tn$1@atlantis.news.tpi.pl> <dke0ts$8hh$1@inews.gazeta.pl> <dke245$h2k$1@atlantis.news.tpi.pl> <dke4dd$omj$1@inews.gazeta.pl> <dkfp6p$g59$1@nemesis.news.tpi.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.onet.pl!not-for-mail From: "Robert Kurzawa" <joulesnemo@poczta._ANTYspam_onet.pl.invalid> Newsgroups: pl.comp.lang.vbasic Subject: Re: [VB6] kropka, przecinek i IsNumeric Date: Fri, 4 Nov 2005 15:48:18 +0100 Organization: Onet.pl Lines: 45 Message-ID: <dkfsd3$209$1@news.onet.pl> References: <dkdvj4$6tn$1@atlantis.news.tpi.pl> <dke0ts$8hh$1@inews.gazeta.pl> <dke245$h2k$1@atlantis.news.tpi.pl> <dke4dd$omj$1@inews.gazeta.pl> <dkfp6p$g59$1@nemesis.news.tpi.pl> NNTP-Posting-Host: zj138.internetdsl.tpnet.pl Mime-Version: 1.0 X-Trace: news.onet.pl 1131115747 2057 80.53.141.138 (4 Nov 2005 14:49:07 GMT) X-Complaints-To: usenet@news.onet.pl NNTP-Posting-Date: Fri, 4 Nov 2005 14:49:07 +0000 (UTC) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Sender: hEcFbcdZSiEHpfpCa7Ce8N39RR2YXsG+AvhAeILI48A= X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-Priority: 3 X-MSMail-Priority: Normal Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit