转载lbl20020123 (2002-03-29 21:14:00) 较高级的一种做法是把信息写到可执行程序中去,有兴趣的朋友可以讨论一下。 完颜康 (2002-03-29 21:20:00) 写注册表也可以改的。我觉得不好有个asprotect12 很不错,可以给你的程序加衣服,县时(次)都很方便,包一下就好要要发给你 苟延残喘 (2002-03-29 21:25:00) 完哥,谢谢,谢谢,期待 whitehorse (2002-03-29 21:33:00) 写到.exe里比较困难,写到ini文件中:uses中包含inifiles单元Before you run this example, you must add the IniFiles unit to the uses clause of your unit.Warning: Do not click button2 before you have clicked button1!procedure TForm1.Button1Click(Sender: TObject);var MyIniFile: TIniFile; begin MyIniFile := TIniFile.Create('myapp.ini'); Memo1.Clear; MyIniFile.ReadSectionValues('Transfer', Memo1.Lines); if Memo1.Lines.Values['Title1'] <> 'Picture Painter' then MyIniFile.WriteString('Transfer', 'Title1', 'Picture Painter'); MyIniFile.Free;end;procedure TForm1.Button2Click(Sender: TObject);var MyIniFile: TIniFile; begin MyIniFile := TIniFile.Create('myapp.ini'); { if the entry wasn抰 there before, delete it now } if Memo1.Lines.Values['Title1'] = '' then MyIniFile.DeleteKey('Transfer', 'Title1') { otherwise, restore the old value } else MyIniFile.WriteString('Transfer', 'Title1', Memo1.Lines.Values['Title1']); MyIniFile.Free;end;