DirDemoForm.pas
资源名称:delphi.rar [点击查看]
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:1k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit DirDemoForm;
- interface
- {$WARN UNIT_PLATFORM OFF}
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- Db, Grids, DBGrids, StdCtrls, MdDsDir, ComCtrls, MdDsCustom,
- MdDsList, ShellCtrls;
- type
- TForm1 = class(TForm)
- DBGrid1: TDBGrid;
- DataSource1: TDataSource;
- ShellTreeView1: TShellTreeView;
- MdDirDataset1: TMdDirDataset;
- MdDirDataset1FileName: TStringField;
- MdDirDataset1TimeStamp: TDateTimeField;
- MdDirDataset1Size: TIntegerField;
- MdDirDataset1Attributes: TStringField;
- MdDirDataset1Folder: TBooleanField;
- procedure ShellTreeView1Change(Sender: TObject; Node: TTreeNode);
- private
- { Private declarations }
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.DFM}
- procedure TForm1.ShellTreeView1Change(Sender: TObject; Node: TTreeNode);
- begin
- MdDirDataset1.Close;
- MdDirDataset1.Directory := ShellTreeView1.Path + '*.*';
- MdDirDataset1.Open;
- end;
- end.