谁帮我把VB转成delphi的代码
PrivateSubCommand1_Click()DimiAsLong,s()AsStringlist1.clears=Split(Text2.Text,vbCrLf)...
Private Sub Command1_Click()
Dim i As Long, s() As String
list1.clear
s = Split(Text2.Text, vbCrLf)
for i=0 to ubound(s)
if instr(s(i),trim(text1.text)) then List1.AddItem s(i)
next
End Sub
会的帮我下,谢谢了 展开
Dim i As Long, s() As String
list1.clear
s = Split(Text2.Text, vbCrLf)
for i=0 to ubound(s)
if instr(s(i),trim(text1.text)) then List1.AddItem s(i)
next
End Sub
会的帮我下,谢谢了 展开
1个回答
展开全部
procedure form1.command1onclick(sender: tobjejct);
var
i: integer;
s: tstringList;
begin
list1.clear;
s := tstringlist.create;
try
s.text := text2.text;
for i := 0 to s.count - 1 do
begin
if pos(s[i], trim(text1.text)) then list1.add(s[i]);
end;
finally
s.free;
end;
end;
var
i: integer;
s: tstringList;
begin
list1.clear;
s := tstringlist.create;
try
s.text := text2.text;
for i := 0 to s.count - 1 do
begin
if pos(s[i], trim(text1.text)) then list1.add(s[i]);
end;
finally
s.free;
end;
end;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询