Copyright: Copyright 1996, PTAHSoft GmbH


Multilingual Messages Manager, version 2.0

Properties	Methods	Events	Trappable errors

The PSMMM control provides a consistent mechanism for managing the messages (text, caption, menu, etc.) that may appear within an application. It is design to make easier the development of multilingual applications with dynamic change of the user interface, but it could be an alternative of the string resource.

File Name

PSMMM.OCX, PSMMM32.OCX

Library/Class Name

PSMMMLib.PSMMM

Distribution Note The PSMMM control is found in the PSMMM32.OCX file (32-bit version) or in PSMMM.OCX (16-bit version). To use the PSMMM control in your application, you must add the control's OCX file to the project. When distributing your application, install the appropriate OCX file in the user's Microsoft Windows SYSTEM directory. For more information on how to add a custom control to a project, see the Programmer's Guide.

Registration of PSMMM.OCX / PSMMM32.OCX


Methods

All of the methods for this control are listed in the following table.

*SetLanguage	*FetchMessage


Properties

All of the properties for this control are listed in the following table. Properties that apply only to this control, or that require special consideration when used with it, are marked with an asterisk (*).

*FileName	Parent

Index	*SupportedLanguage

Left	Tag

Name	Top

*NberOfSupportedLanguages	*WindowsLanguage


Events

All of the events for this control are listed in the following table.

*LanguageChange


Trappable errors

The control may return the following trappable errors.

Code	Message	Description

20001	The chosen language is not a supported language.	This error occurs when you call the SetLanguage method with a language that is not supported.

20002	No file loaded.	This error occurs when you call SetLanguage or FetchMessage and you did not set the FilName property

20003	There is no message associate with this ID.	This error occurs when you call FetchMessage with a message number that does not exist.


FileName Property

Specifies the name of the file that contains the strings. The property contains the full path name. The control searches for a matching file in the following directories (in this order):

1	The specified directory

2	The current directory.

3	The Windows directory.

4	The Windows system directory.

5	The directory containing the executable file for the current task.

6	The directories listed in the PATH environment variable.

7	The list of directories mapped in a network.

Syntax

[form.]PSMMM.FileName[ = setting$]

Remaks

We recommend to place the file in the application directory.

The following properties will be updated when the FileName property change:

1	NberOfSupportedLanguages

2	SupportedLanguage

The file must be found in the specified directory or in one of the directories listed before.

Data Type

String


SetLanguage Method

Sets the language in witch the messages will be returned. The default language is the first supported language of the ressource file.

Syntax

[form!]PSMMM.SetLanguage( Language )

The SetLanguage method syntax has these parts:

Part	Description

Language	A string that contains the short name of the language.

Settings

The setting for Language must be one of the supported languages that are listed in the SupportedLanguage property array:

Remarks

If the language is not supported, then the trappable error 20001 occurs.


FetchMessage Method

Returns a string that contains the message that is associate with the specified ID. If no message is associate with the ID, then the trappable error 20003 occurs

Syntax

[form!]PSMMM. FetchMessage( MessageID )

The FetchMessage method syntax has these parts:

Part	Description

MessageID	A integer that contains the ID of a message.

Data Type

String


NberOfSupportedLanguages Property

This property contains the number of languages that the SupportedLanguage property array contains.

Syntax

[form!]PSMMM.NberOfSupportedLanguages

Data Type

Integer


SupportedLanguage Property Array
SupportedLanguage Property

The SupportedLanguage property is an array filled with the short names of the supported languages that are specified in the resource file. The size of the array is NberOfSupportedLanguages and the indexes are based to 0.

Syntax

[form!]PSMMM.SupportedLanguage( index )

The SetLanguage property syntax has these parts:

Part	Description

index	An integer that contains the index of the language

Data Type

String


WindowsLanguage Property

The WindowsLanguage property is set when the control is loaded with the language specified in the WIN.INI file. It contains not necessarily a supported language. If you try to call SetLanguage with this language and it is not supported, then the trappable error 20001 occurs.

Usage

[form!]PSMMM.WindowsLanguage

Data Type

String


LanguageChange Event

This event occurs when the SetLanguage method is called. You can use it to reload the strings that are currently visible on the screen.

Declaration

Sub PSMMM_LanguageChange ( NewLanguage As String )


Registration of PSMMM.OCX / PSMMM32.OCX

The registration of this control give you the right to us it and distribute it.

Registration by Mail

Registration by "SWREG" Forum of Compuserve


Registration by Mail

You can print this form selecting Print Topic from the File menu.

Register by Mail ($50)

Name:	______________________________________________

Company:	______________________________________________

Address:	______________________________________________

City	______________________________________________

Zip:	______________________________________________

Country:	______________________________________________

Tel:	__________________	Fax: 	____________________

GSM:	__________________	E-Mail:	____________________

Signature:	______________________________________________

Send completed form with payment to:

PTAHSoft GmbH
P.O. Box 193
CH-1723 Marly 1
Switzerland

FAX number: 0041 37 46 00 65

___________________________

+++  Only Cash or Cheque  +++

___________________________


Registration by "SWREG" Forum

Register by Compuserve (50$)

Start your CompuServe terminal and go in the "SWREG Forum". There you select "Register Shareware", then go in the "Europe Forum". The "RegistrationID" is 8296.

Send us your feedback:

CompuserveID:	75240, 664
Title:	"Feedback:  PSMMM.OCX"