Hidden Features of the Delphi 5 and 6 IDE

Posted December 15th @ 3:43 pm by m3Rlin

Here are 3 undocumented registry settings that modify the behavior of the Delphi component palette in a manner you may like. But why are there hidden features first of all and why are they not “available” to the public? They may may have been introduced too late into the product to get documented, or they [...]

How to Detect Font and Text Sizes

Posted December 15th @ 2:01 pm by m3Rlin

When creating components you may want to know when the user changed the font or text. This can be quite easily done using the CM_FONTCHANGED and CM_TEXTCHANGED messages.

TComponent1 = class(TComponent)

private

procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED;
procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED;

procedure TComponent1.CMTextChanged(var Message:TMessage);
begin

end;
procedure TComponent1.CMFontChanged(var Message:TMessage);
begin

end;

« Previous EntriesNext Entries »