Solved

Up and down of resource file's

Posted on 2001-08-10
7
132 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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 …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

760 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

20 Experts available now in Live!

Get 1:1 Help Now