Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
There are two key values in the following registry keys that are changed when you change the information on this page you describe:
(windows 2k )
HKEY_CURRENT_USER\Software
(Windows 9x)
HKEY_CURRENT_USER\Software
Here is code that is very rough and dirty. When the form first opens it populates the three list boxes. Listbox1 holds the subkeys to the registry setting for IE5.0. ListBox2 holds the values for the currently selected subkey from listbox1 (Form1.OnCreate gives you the value for HKCU\Software\Microsoft\In
If you click one of the items in ListBox1 the registry will open that subkey and get the Values IEFixedFontName IEPropFontName and Script(Windows 9x). These values will show up in ListBox2. The corresponding fonts for each of these values will show up in listbox3.
To modify one of these fonts (this is the rough and dirty work) you click on listbox2; an inputbox will appear indicating that it needs a new font name. This is where you add your font. When you click okay it over writes the data for that key value.
The problem here is this: the USER DEFINED key seems to change (i.e. the first time I tried this i found that HKLM\Software\Microsoft\In
anyway here is the code:
Hope this helps.
--------cut below this line---------------
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, Registry;
type
TForm1 = class(TForm)
ListBox1: TListBox;
ListBox2: TListBox;
ListBox3: TListBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Button1: TButton;
procedure ListBox1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure ListBox2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
Keyname2 : String;
Defaultscrpt : Integer;
implementation
{$R *.DFM}
procedure TForm1.ListBox1Click(Sende
var
Reg: TRegistry;
Buffer : Integer;
i : Integer;
ValueName,KeyName : String;
Value : TRegKeyInfo;
Strings : TStrings;
begin
Reg := TRegistry.Create;
Strings := TStringList.Create;
try
ListBox2.Clear;
ListBox3.Clear;
Reg.RootKey := HKEY_CURRENT_USER;
i:=ListBox1.ItemIndex;
KeyName := '\Software\Microsoft\Inter
KeyName := KeyName+ListBox1.Items.Str
Keyname2 := KeyName;
if Reg.OpenKey(KeyName,False)
begin
Reg.GetKeyInfo(value);
Reg.GetValueNames(Strings)
ListBox2.Items.AddStrings(
for i := 0 to ListBox2.Items.Count -1 do
begin
ListBox3.Items.Add(reg.Rea
end;
end;
finally
Strings.Free;
Reg.Free;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
var
Reg: TRegistry;
Buffer : Integer;
Value : TRegKeyInfo;
Strings : TStrings;
begin
Reg := TRegistry.Create;
Strings := TStringList.Create;
ListBox1.Clear;
ListBox2.Clear;
ListBox3.Clear;
try
Reg.RootKey := HKEY_CURRENT_USER;
if Reg.OpenKey('\Software\Mic
begin
Reg.GetKeyInfo(value);
Reg.GetKeyNames(Strings);
ListBox1.Items.AddStrings(
Reg.GetValueNames(Strings)
ListBox2.Items.AddStrings(
Reg.ReadBinaryData(Strings
DefaultScrpt := Buffer;
ListBox3.Items.Add(IntToSt
Reg.CloseKey;
end;
finally
Strings.Free;
Reg.Free;
end;
end;
procedure TForm1.ListBox2Click(Sende
var
Reg: TRegistry;
Buffer : Integer;
i : Integer;
ValueName,KeyName : String;
Value : TRegKeyInfo;
Strings : TStrings;
GetStr : String;
begin
Reg := TRegistry.Create;
Strings := TStringList.Create;
try
ListBox3.Clear;
Reg.RootKey := HKEY_CURRENT_USER;
Keyname := KeyName2;
if Reg.OpenKey(KeyName,False)
begin
i := ListBox2.ItemIndex;
GetStr := InputBox('Key Value'+ ListBox2.Items.Strings[i],
Reg.WriteString(ListBox2.I
end;
finally
Strings.Free;
Reg.Free;
end;
end;
procedure TForm1.Button1Click(Sender
begin
Form1.OnCreate(Sender);
end;
end.
---------cut above this line -------------
Good Luck
GEM