frmljsz.~pas

来自「delphi+excel报表管理程序」· ~PAS 代码 · 共 75 行

~PAS
75
字号
unit frmljsz;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls,IniFiles;

type
  TForm8 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Label1: TLabel;
    Edit1: TEdit;
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form8: TForm8;

implementation 

{$R *.dfm}

procedure TForm8.Button2Click(Sender: TObject);
var
MyIni:TIniFile;
begin 
MyIni:=Tinifile.create('.\lj.ini');
if edit1.Text='' then
        begin
        application.MessageBox('请输入要设置的路径!','系统提示');
        edit1.SetFocus;
        exit;
        end
else
        myini.WriteString('系统路径设置','系统路径',edit1.Text);
end;

procedure TForm8.Button1Click(Sender: TObject);
var
MyIni:TIniFile;
test,lujing:string;
begin
MyIni:=Tinifile.create('.\pdljsfszcg.ini');
if edit1.Text='' then
        begin
        application.MessageBox('请输入要设置的路径!','系统提示');
        edit1.SetFocus;
        exit;
        end;
lujing:=edit1.Text+'\test\';
test:=filesearch('goodness.ini',lujing);
if test='' then
        begin
        application.MessageBox('路径不正确,请重新录入!','系统提示');
        myini.WriteString('判断路径是否设置成功','flag','0');
        edit1.SetFocus;
        exit;
        end
else
        begin
        application.MessageBox('路径设置成功,请保存!','系统提示');
        myini.WriteString('判断路径是否设置成功','flag','1');
        end;

end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?