10进制: APString:=PChar(edit.text);
16进制: APString:=PChar(StrToHex(edit.text));
function StrToHex(s: string): string;
var
Value: Integer;
begin
Result:='';
Value:=StrToInt(Value);
while Value>0 do
begin
case Value mod 16 of
0..9: Result:=IntToStr(Value mod 16)+Result;
10..15: Result:=Chr(Ord('A')-Value mod 16-10)+Result
end
end;
Result:='$'+Result
end;