Recent

Author Topic: Check this code in win10  (Read 3918 times)

AndyJonson

  • New Member
  • *
  • Posts: 10
Check this code in win10
« on: April 02, 2017, 11:15:45 pm »
pleese check in Windows 10 (or windows 8 ):

procedure TForm1.Button7Click(Sender: TObject);
var
  fnt: TFontParams;
  ModifyMask: TTextModifyMask;
  AddFontStyle, RemoveFontStyle: TFontStyles;
begin
  ModifyMask := [tmm_Color, tmm_Styles, tmm_Size, tmm_BackColor];
  fnt.Size:=30;
  fnt.Color:=clLime;
  fnt.BkColor:=clRed;
  AddFontStyle := [fsBold];
  RemoveFontStyle := [];
 
  RichMemo1.SetRangeParams(RichMemo1.SelStart, RichMemo1.SelLength,
  ModifyMask, fnt, AddFontStyle, RemoveFontStyle);
end;

It works correctly in windows 7, but ... in Delphi I can't set background color in Windows 10 - some new in WinAPI. Now I haven't computer with Win10 to tests...

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Check this code in win10
« Reply #1 on: April 02, 2017, 11:34:11 pm »
that worked (in Windows 10)!
« Last Edit: April 02, 2017, 11:35:45 pm by skalogryz »

AndyJonson

  • New Member
  • *
  • Posts: 10
Re: Check this code in win10
« Reply #2 on: April 02, 2017, 11:55:27 pm »
thank you :)

 

TinyPortal © 2005-2018