烂泥给出了许多例子,shangcm给出了详细的用法。
这正是我想要的。
十分感谢各位。
但是又有了新的问题;
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Mask, ExtCtrls, Buttons, CoolForm, TrMemo, Tranbtn,inifiles;
type
TForm2 = class(TForm)
StaticText1: TStaticText;
StaticText2: TStaticText;
me2: TMaskEdit;
CoolForm1: TCoolForm;
TransparentMemo1: TTransparentMemo;
MTranBtn1: TMTranBtn;
me3: TMaskEdit;
me1: TMaskEdit;
procedure MTranBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.DFM}
procedure TForm2.MTranBtn1Click(Sender: TObject);
var
key:tinifile;
oldkey:string;
begin
key:=tinifile.create('c:/key.ini');
if me2.text=me3.text then
begin
oldkey:=key.readstring('key','key','key');《==
if oldkey=me1.text then
begin
key.writestring('key','key',me3.text);
key.free;
end
else
begin
showmessage('旧密码错误');
me1.clear;
end
end
else
begin
showmessage('新密码有出入');
me2.clear;
me3.clear;
end;
me1.text:=key.readstring('key','key','key');《== //检验用//
end;
end.
以下程序通过编译;
但是me1.text显示是'me1.text'为什么?
我想是不是《==出了问题?本人初学delphi有许多不懂之处
请多指教。(帮助帮道底吗);