assuming i created a TBitmap (bm) as global variable on top ....then,
function TForm1.test();
function getTextWidth(var bm:TBitmap):integer;
var s:string;
var b : tfont;
begin
s := 'From TransNo: [] To TransNo: [] From Salesman: [] To Salesman: [] From Date: [01/10/2007] To Date: [31/10/2007]';
b := TFont.create;
b.Name := 'Times New Roman';
b.Size := 8;
bm.canvas.Font.Assign(b);
result := bm.canvas.textwidth(s);
end;
begin
aWidth := getTextWidth(bm);
.....
..... (other source code)
.....
.....
aWidth := getTextWidth(bm);
end;
at first time, my aWidth value = 595, while the 2nd time , it return 1950; the source code in between have changed my TBtimap property ...is there anyway i can list out all properties of TBitmap object (e.g. size, width ...) so that i can compare what have been changed before and after ...?
thanks
Our community of experts have been thoroughly vetted for their expertise and industry experience.