Salut Dewayne Cox !
DC> I would also like to know the best way to save user
DC> configuration of colors for like background and input areas, etc. Is
DC> there a way to simply write the newly configured objects to a file and
DC> then readin the saved file?
You can use INI files (Delphi 1 or Delphi 2) using the TIniFile
object. With Delphi 32 the preferred method is to use the registry
using the TRegistry object.
Here is an extract from one of my program called MODEMEDT wich
extensively use the registry to access modem parameters:
function TRegModem.GetKey(const SubKey, Key : String) : String;
var
KeyBuf : String;
begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
KeyBuf := '\System\CurrentControlSet\Services\Class\Modem\' + FNumber;
if Length(SubKey) > 0 then
KeyBuf := KeyBuf + '\' + SubKey;
if not Reg.OpenKey(KeyBuf, FALSE) then
raise ERegModemException.Create(
'Key ''HKEY_LOCAL_MACHINE' + KeyBuf +
''' not found in registry');
Result := Reg.ReadString(Key);
Reg.CloseKey;
end;
Amiti‚s,
{-Francois Piette-}
--- SvFido 1.32
---------------
* Origin: OverByte BBS (Embourg-Belgium) 32-41-651395 V-FAST (2:293/2202)
|