Page 1 of 1

what is siFormStorage

Posted: Tue May 27, 2003 1:35 pm
by Sheenajobi
what is siFormStorage

Posted: Tue May 27, 2003 1:44 pm
by gaivans
This is an auxilary component which is used internally in the TsiLang Component Suite to store last forms postion, size and other settings.

Can I get the default lang of the machine.

Posted: Tue May 27, 2003 1:45 pm
by Sheenajobi
Can I get the default lang of the machine.
So I can open the lang according to the local language

Posted: Tue May 27, 2003 2:29 pm
by gaivans
You can use standard Win32 API function GetUserDefaultLangID. For example, something like the below code:
var
LangID: DWORD;
begin
LangID := GetUserDefaultLangID;
case Byte(LangID) of
LANG_ENGLISH: siLang.ActiveLanguage := 1;
LANG_GERMAN: siLang.ActiveLanguage := 2;
else
siLang.ActiveLanguage := 1;
end;
For the full list of language identifiers see Windows.pas or Win32.hlp

Posted: Sun Aug 29, 2004 6:03 am
by Haron
Small mistake: not Byte(LangID) but (LangID and $03FF) !