求助 怎样把这个Delphi代码修改成VB.net代码
procedure TERP.Button1Click(Sender: TObject);var
s: string;
i: integer;
begin
edit2.Text := '';
s := edit1.Text;
for i := 1 to length(s) do
begin
{ if i<>length(s) then
edit2.Text := edit2.Text+inttostr(strtoint('$'+inttostr((StrToInt('$'+s[i])+StrToInt('$'+s[i+1])+i+8))) mod StrToInt('$'+'A'))
else
edit2.Text := edit2.Text+inttostr(strtoint('$'+inttostr((StrToInt('$'+s[i])+StrToInt('$'+s[1])+i+8))) mod StrToInt('$'+'A')); }
if i <> length(s) then
edit2.Text := edit2.Text+inttostr(((strtoint('$'+inttohex(ord(s[i]),2))+strtoint('$'+inttohex(ord(s[i+1]),2))+i+8) mod StrToInt('$'+'A')))
else
edit2.Text := edit2.Text+inttostr(((strtoint('$'+inttohex(ord(s[i]),2))+strtoint('$'+inttohex(ord(s[1]),2))+i+8) mod StrToInt('$'+'A')));
end;
end;