R
retun
Unregistered / Unconfirmed
GUEST, unregistred user!
1。我想按CTRL+C就可以把剪贴板的内容付给 Edit1文本框
2。如何才能自动创建数据库!
请给出详细的代码和方法,谢谢!
2。如何才能自动创建数据库!
请给出详细的代码和方法,谢谢!
procedure TForm1.Button1Click(Sender: TObject);
begin
Create Table abc(
FId Alpha(8),
FName Alpha(8),
FSex Alpha(2),
FYN Alpha(2));
end;
procedure TFrmThe9.Timer1Timer(Sender: TObject);
var
slFile :TStringList;
EdStr : String;
i,nLineNum: integer;
begin
ClipBoard.Open;
try
if ClipBoard.HasFormat(CF_TEXT) then
EdStr :=ClipBoard.AsText
finally
ClipBoard.Close;
end;
slFile:=TStringList.Create;
try
slFile.LoadFromFile('a.txt'); //打开要查找的文本文件
nLineNum:=slFile.Count;
for i:=0 to nLineNum-1 do
begin
if pos(EdStr,slFile[i])<>0 then
Memo1.Lines.Add(slFile[i])
else
begin
while not (nLineNum-1 = I) do
continue;
ClipBoard.Clear;
exit;
end;
end;
finally
slFile.Free;
end;
end;