File tree 1 file changed +20
-5
lines changed 1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ TForm1 = class(TForm)
22
22
ExecPath: string;
23
23
procedure Doing (const filename: string);
24
24
procedure AfterShow (Data: PtrInt);
25
+ procedure BeforeDoing ;
26
+ procedure AfterDoing ;
25
27
public
26
28
{ public declarations }
27
29
end ;
@@ -55,11 +57,11 @@ procedure TForm1.FormDropFiles(Sender: TObject; const FileNames: array of String
55
57
var
56
58
s: string;
57
59
begin
60
+ BeforeDoing;
58
61
for s in FileNames do begin
59
62
Doing(s);
60
63
end ;
61
- Windows.MessageBeep(0 );
62
- Close;
64
+ AfterDoing;
63
65
end ;
64
66
65
67
procedure TForm1.FormShow (Sender: TObject);
@@ -75,14 +77,27 @@ procedure TForm1.AfterShow(Data: PtrInt);
75
77
i: integer;
76
78
begin
77
79
if ParamCount > 0 then begin
80
+ BeforeDoing;
78
81
for i:=1 to ParamCount do begin
79
82
Doing(ParamStr(i));
80
83
end ;
81
- Windows.MessageBeep(0 );
82
- Close;
84
+ AfterDoing;
83
85
end ;
84
86
end ;
85
87
88
+ procedure TForm1.BeforeDoing ;
89
+ begin
90
+ FormStyle:=fsNormal;
91
+ BorderIcons:=BorderIcons+[biMinimize];
92
+ end ;
93
+
94
+ procedure TForm1.AfterDoing ;
95
+ begin
96
+ Label1.Caption:=#$0d#$0d' 処理が終了しました。' ;
97
+ Windows.MessageBeep(0 );
98
+ Close;
99
+ end ;
100
+
86
101
procedure TForm1.Doing (const filename: string);
87
102
var
88
103
sl: TStringList;
@@ -120,7 +135,7 @@ procedure TForm1.Doing(const filename: string);
120
135
sl.Free;
121
136
end ;
122
137
except
123
- Label1.Caption:=' エラーが発生しました' ;
138
+ Label1.Caption:=#$0d#$0d ' エラーが発生しました' ;
124
139
end ;
125
140
end ;
126
141
You can’t perform that action at this time.
0 commit comments