EnumSystemLocales 
Author Message
 EnumSystemLocales

Using VB6 SP5 running on WinXP Pro.

On Randy Birch web site
http://www.*-*-*.com/
the example loads a list box with the systems Country names and language.

Default is English (United State)   ENU for the languge.

Question:
I would like to show the information in the text box, for any of the items
that I click on in the list box.  Does anyone know how to achive this.

I do not see how to achive this.

--
Thanks in advance
Have a Great Day
bob



Thu, 30 Jun 2011 02:01:27 GMT  
 EnumSystemLocales


Quote:
> Question:
> I would like to show the information in the text box, for any of the items
> that I click on in the list box.  Does anyone know how to achive this.

> I do not see how to achive this.

Add one line to the last routine in the BAS module:

   Form1.List1.ItemData(Form1.List1.NewIndex) = dwLocaleDec

EG:
  'and return 1 to continue enumeration
   EnumSystemLocalesProc = 1
   Form1.List1.ItemData(Form1.List1.NewIndex) = dwLocaleDec
End Function

And add a click handler to the form module:

Private Sub List1_Click()
Dim loc As Long
   Text1.Text = ""
   If List1.ListIndex > -1 Then
      loc = List1.ItemData(List1.ListIndex)
      If loc > 0 Then
         Text1.Text = GetUserLocaleInfo(loc, LOCALE_SLANGUAGE) & vbTab & _
                     GetUserLocaleInfo(loc, LOCALE_SABBREVLANGNAME)
      End If
   End If
End Sub

HTH
LFS



Thu, 30 Jun 2011 04:47:48 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem with EnumSystemLocales

 

 
Powered by phpBB® Forum Software