Solved

Up and down of resource file's

Posted on 2001-08-10
7
137 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Visual Basic Excel Formatting error 4 141
bit defender blocks good applications 2 107
passing parameter in sql procedure 9 68
IF ELSE Statement in Excel Macro VBA 16 87
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…

726 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