Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 16973
  • Last Modified:

Convert DWord to String

i have variable that's a DWord type. how can i convert it to a string so i can use it in a listview?

MyVariable: DWord:
0
mr_nix
Asked:
mr_nix
2 Solutions
 
MotazCommented:
You can use IntToStr function:

Label1.Caption:= IntToStr(MyVariable);

Motaz
0
 
kretzschmarCommented:
how will you display it?
as Value?
as Hex-Expression?
0
 
TicketToTotalitarianismCommented:

with format:

var
  t : DWORD;
  str : string;
begin
  t := 256*256;
  str := Format('This is decimal:%d, and this is Hexadecimal:%x',[t,t]);
end;

with inttostr:

var
  t : DWORD;
  str : string;
begin
  t := 256*256;
  str := inttostr(t);
end;


they both work ...
0
 
CleanupPingCommented:
mr_nix:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now