You can use IntToHex in the SysUtils unit provided with Delphi.

IntToHex(10, 1) --> 'A'
IntToHex(10,2) --> '0A'
IntToHex(100,1) --> '64

function IntToHex(Value: Integer; Digits: Integer): string; overload;
function IntToHex(Value: Int64; Digits: Integer): string; overload;

IntToHex converts a number into a string containing the number's hexadecimal
(base 16) representation. Value is the number to convert. Digits indicates
the minimum number of hexadecimal digits to return.


'
----- Original Message ----- 
From: "websmith" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, June 08, 2005 9:55 PM
Subject: display integer value in Hex


at this junction, struggling with showing an integer value in Hex to be
displayed in a label caption.

for example if the value of an integer variable has 10 in decimal, would
need to show it as 0A in the label.

how ? what's your advise.

ciao

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi


_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to