?? inputfrm.pas
字號(hào):
unit inputfrm;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls,datamodulefrm;
type
Tinputform = class(TForm)
OpenDialog1: TOpenDialog;
RadioGroup1: TRadioGroup;
Button1: TButton;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
inputform: Tinputform;
implementation
{$R *.DFM}
procedure Tinputform.Button1Click(Sender: TObject);
var
i,j,k,l:integer;
addr,s,s1,s2:string;
myfile:textfile;
begin
if opendialog1.Execute then
begin
addr:=opendialog1.FileName;
if addr<>'' then
begin
assignfile(myfile,addr);
reset(myfile);
case radiogroup1.ItemIndex of
0:with datamodule2 do
begin
k:=inputtable2.FieldCount;
k:=k-1;
while not eof(myfile) do
begin
readln(myfile,s1);
i:=0;
inputtable2.Append;
for l:=1 to k do
if pos(',',s1)>0 then
begin
j:=pos(',',s1);
s2:=copy(s1,i,j-i);
i:=j+1;
S1[Pos(' ', S)] := '.';
// inputtable2.Fields[l].asstring:=s2;
label1.caption:=s1;
end;
end;
inputtable2.Post;
end;
end;
end;
end;
end;
end.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -