自定义MEMO控件的边界

//自定义Memo控件的边界
procedure TForm1.Button1Click(Sender: TObject);
var
Rect: TRect;
begin
SendMessage(Memo1.Handle, EM_GETRECT, 0, LongInt(@Rect));
Rect.Left := 20;
Rect.Top := 20;
Rect.Right := Rect.Right - 19;
Rect.Bottom := Rect.Bottom - 19;
SendMessage(Memo1.Handle, EM_SETRECT, 0, LongInt(@Rect));
Memo1.Refresh;
end;

你可能感兴趣的:(自定义)