eesdil
asked on
How can I get the List Separator under Visual Basic .NET 2003?
Dears,
I would like to ask if you could advice how can I get the List Separator from Locale in VB 2003.
If I used the solution of VB 6 (GetLocalInfo()) it was not working.
Could you tell me what i did wrong?
Thank you so much
best regards
I would like to ask if you could advice how can I get the List Separator from Locale in VB 2003.
If I used the solution of VB 6 (GetLocalInfo()) it was not working.
Could you tell me what i did wrong?
Thank you so much
best regards
Public 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
Public Const LOCALE_SLIST = &HC
Dim ListSeparator As String
GetLocaleInfo(Locale, LOCALE_SLIST, ListSeparator, 0)
ASKER
Hi Tim,
Thank you for the quick answer.
but I have some issues with it :)
Do I have to declare something for it?
I have tried usage from msdn, but it didnt work either...
It is throwing an excepten: Object reference not set to an instance of an object
Could you help what it is?
thanks in advance
regards,
csaba
Thank you for the quick answer.
but I have some issues with it :)
Do I have to declare something for it?
I have tried usage from msdn, but it didnt work either...
It is throwing an excepten: Object reference not set to an instance of an object
Could you help what it is?
thanks in advance
regards,
csaba
Dim infoInstance As TextInfo
Dim listSep As String
listSep = infoInstance.ListSeparator
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Tim,
thanks a lot it is working perfectly (out of box)
best regards,
csaba
thanks a lot it is working perfectly (out of box)
best regards,
csaba
Dim ListSeparator As String = System.Globalization.TextI
Regards,
TimCottee