June 11, 2007
Will Code for Diapers! - 2read more »
Another issue of Delphi applications is that default font on forms is MS Sans Serif 8, meanwhile Windows default system font is Tahoma 8.25, and may be different at all - someone could set system font to be Comic Sans MS, or Lucida Sans Unicode, etc.
Here is Delphi code to make Delphi applications use default system font, opposed to MS Sans Serif 8:
procedure TgxCustomForm.FormCreate(Sender: TObject); begin NonClientMetrics.cbSize := SizeOf(NonClientMetrics); SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, @NonClientMetrics, 0); Font.Handle := CreateFontIndirect(NonClientMetrics.lfMessageFont); if Scaled then begin Font.Height := NonClientMetrics.lfMessageFont.lfHeight; end; end;
»
Comments for this post
dr9azya9fsvfrfvb
Post new comment