This example tests the color that modifies the cursor, and the effect chart:
Code files:Unit Unit1;InterfaceUsesWindows, Messages, sysutils, variants, Classes, Graphics, Controls, Forms,Dialogs, Stdctrls, Extctrls;TypeTForm1 = Class
This example tests the speed at which the cursor is set to blink, noting that this affects other programs and that the exit should revert to the system default of 530 milliseconds.
This example effect chart:
Code files:Unit
Statement:QueryPerformanceCounter( var lpPerformanceCount: TLargeInteger {获取定时器每秒的频率数; TLargeInteger = Int64} ): BOOL; {返回 False 表示调用失败, 或者是硬件不支持高性能定时器}
An interesting example: Determine the speed of your mouse clicks; My fastest record is 151
There is no line of code three layer, the function must be very simple, but, again simple, we also three layers, learning a thing, need to start from the beginning of interest, if the introduction to frighten scared, where then how to confidence to
Proportional change
var g: TGPGraphics; p: TGPPen; rect: TGPRect; begin g := TGPGraphics.Create(Canvas.Handle); p := TGPPen.Create(MakeColor(255,255,0,0),0); rect := MakeRect(10,10,100,100); g.DrawRectangle(p, rect); {原始} g.ScaleTransform(2,
Closed curve var g: TGPGraphics; p: TGPPen; sb: TGPSolidBrush; pts: array[0..4] of TGPPoint; begin g := TGPGraphics.Create(Canvas.Handle); sb := TGPSolidBrush.Create(MakeColor(255,255,255)); p := TGPPen.Create(MakeColor(255,0,0),4); pts[0].X
Fill and stroke
var g: TGPGraphics; p: TGPPen; sb: TGPSolidBrush; begin g := TGPGraphics.Create(Canvas.Handle); sb := TGPSolidBrush.Create(MakeColor(255,255,255)); p := TGPPen.Create(MakeColor(255,0,0),6); g.FillRectangle(sb, 0, 0,
Solid painting Brush
var g: TGPGraphics; sb: TGPSolidBrush; begin g := TGPGraphics.Create(Canvas.Handle); sb := TGPSolidBrush.Create(aclGreen); {参数是颜色} g.FillEllipse(sb, 11, 11, 222, 111); sb.Free; g.Free; end;
Set Paint brush Color
var g:
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