Solved

Up and down of resource file's

Posted on 2001-08-10
7
136 Views
Last Modified: 2010-05-02
I'm am a new comer to VB6, what are the advantage and dis-advantages of using resource file with mulitple string tables ????. i'm currently doing a project which has to be translated into English, Dutch, French, Italian, German and Polish. People have said to use ini files to store the string the read them out, with 1500 different strings to translate won't the slow the application down ?????? Please HELP All EXPERTS ROCK  
0
Comment
Question by:LPlate
7 Comments
 
LVL 15

Expert Comment

by:cquinn
ID: 6371653
There is a problem with ini files if you have many strings to hold - Ini files can only be a maximum of 64kb in size - anything that goes over this limit will not be accessible.

Resource files can be any size, but you need to get hold of a Resource compiler - it used to come free with Microsoft help file authoring tools - I don't know if it still does.

Resources can also hold other things - graphics, sounds etc, which ini files cannot.

There was an example project using resource files on the VB install CD's - I think it was called ATM - a simulation of a multilingual cash machine - this will give you the basics
0
 
LVL 1

Expert Comment

by:kdg2000
ID: 6371677
It is possible certainly to use INI the file, but the resource file is better.

For this purpose the editor of resources (tab of the menu Add-Ins\Add-In Manager is necessary to connect...). Will be started Add-In Manager. In it is necessary to find VB6 Resouce Editor and to select options 'Loaded\Unloaded' and ' Load on StartUp '. The option ' Add New Resource File ' in the tab 'Project' will appear.

Further about operation with Resource File:

In the help is written, that it is necessary to create the separate tables depending on the language and at change of regional installations the language table automatically varies. But for me it has failed.
And I have made all strings in one table, but with offset, for example: the English strings - ID 1-1000; French - ID 1001-2000 and so on.
And in the program such code:

Public LanguageProgramm As Language_Mode
Public Enum Language_Mode
    None = -1
    English = 0
    French = 1000
End Enum

Me.Label1.Caption = LoadResString (LanguageProgramm + 10)

Where '10' is an offset on the necessary string inside the array of strings with the identical language.
0
 
LVL 3

Expert Comment

by:Joebob
ID: 6372383
The only disadvantage of using a single resource file with multiple string tables is that it will not work in Win9x or WinCE.  The only Microsoft OS that supports multiple string tables is WinNT, 2k, and XP.  If you want to use a single resource file for all of your strings and you need compatibility with the Win9x or CE environments, do the following.

Decide on resource id ranges such as 1 to 2000 is English, 2001 to 4000 is German, etc.  When your app loads, call the GetLocale function to find where you are and set an offset (i.e. offset would be 2000 for German).  Then when reading from the resource file, you would use LoadResString(EnglishResID + Offset).
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6374990
I used multiple string tables in win98 whiout any problem. I suggest use it instead of ini files, or use a database if you want.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7199890
Hi LPlate,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Save as PAQ -- No Refund.
    *** All good answers; tto few points to split.

LPlate, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7202348
Good to me.
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 7213429
Per recommendation, points NOT refunded and question closed.

Netminder
CS Moderator
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

856 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