[Last Call] Learn how to a build a cloud-first strategyRegister Now


Find Regional option of PC using VB

Posted on 2004-11-16
Medium Priority
Last Modified: 2013-12-25

 I am developing a VB6 windows application. This is intended for arabic  users also. As the User clicks a button, he is expecting to switch to the arabic text. But I want to check whether the regional option selected on user's PC is Arabic. How can I check this using VB6?

The following is desirable,
   As the user clicks on the button expecting  switching to Arabic, how can the Regional option of the User can be set to Arabic
  (Is this possible using VB6?)


Question by:sgs1970
1 Comment
LVL 22

Accepted Solution

danaseaman earned 200 total points
ID: 12592602
Option Explicit

Private Declare Function GetUserDefaultLCID Lib "kernel32" () As Long
Private Declare Function GetSystemDefaultLCID Lib "kernel32" () As Long

Private Sub Form_Load()
   'Get LCIDs
   Debug.Print "UserDefaultLCID =", GetUserDefaultLCID
   Debug.Print "SystemDefaultLCID =", GetSystemDefaultLCID
   Debug.Print "IsArabic =", IsArabic(GetUserDefaultLCID)
End Sub

Public Function IsArabic(ByVal Lcid As Long) As Boolean
   Select Case Lcid
      Case 5121, 15361, 3073, 2049, 11265, 13313, 12289, 4097, 6145, 8193, 16385, 1025, 10241, 7169, 14337, 9217
         IsArabic = True
   End Select
End Function

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month18 days, 12 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question