Online on this issue a lot of posts, but often not very comprehensive, the author also encountered a lot of practical problems in the use, such as the parameters do not exist Ah, type no reference ah, and so on. Below I try to carefully to achieve
Wonderful XOR or operation, on these simple code, repeatedly click on the button ...procedure TForm1.Button1Click(Sender: TObject); begin Canvas.Pen.Color := clYellow; {指定笔颜色为黄色} Canvas.Pen.Width := 20; {笔宽 20} Canvas.Pen.Mode := pmXor;
Statement of the first Overload:Textrect ( Rect:trect; Rectangle X, Y:integer;
{Relative to the position of the form} Const text:string {text});{If the text you want to output exceeds the specified rectangle, it will
not be displayed}
Add Panel1, PaintBox1, and Button1 to the form, as follows:
procedure TForm1.Button1Click(Sender: TObject); var cvs: TCanvas; begin {PaintBox1 就像窗体一样, 也有 Canvas 属性} PaintBox1.Canvas.Brush.Color := clRed;
Drawings need to have paper, brush, brush; Delphi has Canvas, Pen, Brush.
Canvas is the canvas, such as the Canvas property of the form, the canvas of the form;
Pen is a brush, you can set pen color, pen width, and so on;
Brush is a brush, you
1.Class Fields
Example 1 member variableType Tancestor = Class Value:integer; End Tdescendant = Class (Tancestor) value:string; Hides the Inherited Value field EndVar Myobject:tancestor;Begin MyObject: = tdescendant.create;
Class Unit
unit NumBox; interface type TNumBox = class private FCount: Integer; public procedure AddOne; procedure AddFive; procedure ZeroCount; function GetCount: Integer; end; implementation { TNumBox } procedure TNumBox.AddOne;
The author recently developed the system needs to write a download file function. Previously used BCB invoke API written very cumbersome, suddenly remembered that there is an API can be done, so early in the morning to search. This API is
A little bit of free time today, by the way, it's not something esoteric, but practical, it might be useful for friends who don't want third-party controls but want to add some effect. The effect of the implementation is as shown in figure:
Step
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service