I would like to get text width of a string before an application starts. Everything works fine until Application.MainForm canvas present. The problem is, when I try dynamica
This works:
procedure TForm1.FormCreate(Sender: TObject); var c: TBitmap; begin c := TBitmap.Create; try c.Canvas.Font.Assign(self.Font); Caption := IntToStr(c.Canvas.TextWidth('My String')); finally c.Free; end; end;