MyDialogU.pas
上传用户:psxgmh
上传日期:2013-04-08
资源大小:15112k
文件大小:1k
- unit MyDialogU;
- interface
- uses
- Windows, Messages, SysUtils, Classes,forms;
- type
- TMyDialog = class(TComponent)
- private
- FDirectoryName : String;
- { Private declarations }
- protected
- { Protected declarations }
- public
- Function Execute : boolean;
- { Public declarations }
- published
- property DirectoryName : string read FDirectoryName write FDirectoryName;
- { Published declarations }
- end;
- procedure Register;
- implementation
- uses MyDialogFrm;
- procedure Register;
- begin
- RegisterComponents('Samples', [TMyDialog]);
- end;
- Function TMyDialog.Execute : Boolean;
- begin
- with TfrmDialog.create(Application) do
- begin
- try
- showmodal;
- result := Flag;
- If Flag then
- FDirectoryName := DirectoryListBox.Directory ;
- finally
- free;
- end;
- end;
- end;
- end.