Solved

Can a MAKELANGID script be created using VB Script?

Posted on 2013-06-26
3
346 Views
Last Modified: 2013-06-27
How would this code be converted into a VB Script?

Public Const LANG_KAZAK                       As Integer = &H3F
Public Const LANG_RUSSIAN                     As Integer = &H19
Public Const LANG_ENGLISH                     As Integer = &H9
Public Const SUBLANG_ENGLISH_US               As Integer = &H1     ' // English (USA)

Public Function MAKELANGID (ByVal usPrimaryLanguage As Integer, ByVal usSubLanguage _
            As Integer) As Long
      MAKELANGID = (usSubLanguage * 1024) Or usPrimaryLanguage
End Function
0
Comment
Question by:tconingford
  • 2
3 Comments
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 39281730
I'm only guessing about the function.  

LANG_KAZAK           =63'            As Integer = &H3F 
LANG_RUSSIAN         =25'            As Integer = &H19 
LANG_ENGLISH         =9'            As Integer = &H9 
SUBLANG_ENGLISH_US   =1'            As Integer = &H1     ' // English (USA)

'Submit as x = MAKELANGID(1,"") or x = MAKELANGID("",1)    
Function MAKELANGID (usPrimaryLanguage,usSubLanguage)
      if  usPrimaryLanguage<>"" then
      	MAKELANGID = usPrimaryLanguage
      	else
      	MAKELANGID = (cdbl(usSubLanguage) * 1024)
      end if 
End Function

Open in new window

0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39282712
I'm glad it worked out.  thanks for the points!
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now