in a case there I wan't to change letter in an index from 0- 28 to
just 0 - 26 it's commandbuttons, and the 3 letters should be dissaabled,
the code is in swedish just now, but
I will change that in language settings to english letters.
and how can I make that the layout in national enveriment change to english

Thanks in advance


the code

Dim x

For x = 0 To 28
SSCommand1(x).ForeColor = &HC00000 ' blå&HC00000
SSCommand1(x).Font3D = 0
SSCommand1(index).Font3D = 3
SSCommand1(index).ForeColor = &HFF& ' röd &HFF&
Label1.FontBold = True
Label1.ForeColor = &HFF&
Label1.Caption = " Vald Bokstav " & SSCommand1(index).Caption
SSCmdOk.Visible = True
Label9.Visible = True
Label9.Caption = " OBS!"
Label8.Visible = True
Label8.Caption = " Inga Uppgifter tillgängliga på bokstaven " & " , lägga till"
Label10.Visible = True
Label10.ForeColor = &HFF&
Label10.Caption = SSCommand1(index).Caption

SSCmdCancel.Visible = True

5 Years
Discussion Span
Last Post by hkdani

International settings can be changed in VB6 by the end user by changing the locale settings in the control panel.

In VB6 you should be careful to use international friendly code so that this can be done, for example: format(curAmount, "currency") The code will search the user's locale settings set by him in control panel for the local currency and use those settings for setting the currency symbol and the decimal point. Some countries use a dollar sign, some a pound sign. Some use a comma for a decimal point, some use a period, etc.

Thus, if your code is international friendly, you won't have to worry about writing special code for each country. International friendly functions are already built into the programming language, you just have to use them.

The same applies for formatting for time: format(dateTime, "longtime") If you use the resource editor in VB6, you can have your program load different values for the captions based on the locale settings set by the user in Control Panel.

Then instead of using the properties for caption directly to load a caption for a control, you use the tag property of the control to store a numeric value which will be used by the LoadResString() function:

Private Sub Form_Load()
    ' LoadResString(ByValID as long) as String
    Form1.Caption = LoadResString(CLng(Form1.Tag))
End Sub

Loading Menus and some other controls is different. You'll have to stick the numeric value in the caption or another property area. But one of the main purposes of the Resource Editor is to provide internationalization for your programs.

But as far as your first question, it's not too clear. Please, give an example of what you wish to accomplish.

Edited by hkdani: n/a



The program I'am doing is a phonebok

there the first form is cald TelefonBoken and are in the Swedish
enviroment but my question was that my doughter living in Canada
should use the same TelefonBok.

I have one form for Sweden and second for Canada
now the problem that when she goes to the swedish form
she should have tre more buttons 1 - 28( it's these thre AE = Ö, AA= Å and OE = Ä)
and the swedish language and when she goes back to form Canada then she
have the english language with just 1 - 25 buttons.

Thanks for the suggestion You made



You could add an Edit Menu to your program with a Preferences Menu Item. You could use that to toggle the buttons on your form with the checked value of the menu item.


In the code you would then change the properties to make them enabled or disabled based on the checked state of the menu item. You can change the visible property of a button to make it appear or disappear.

For a quicker, easier, and a more visible solution to the end user, you could add a toolbar with an imagelist and use images of the national flags to toggle the addition or removal of the other buttons. One button with an American or British Flag and the other button with an image of the French Flag.

If you want to add different language characters to a button and they will not show up, you can set the style property of the button to Graphical. And then use a Picture with the desired letter for the Picture property of the button.

Edited by hkdani: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.