Delphi Issameday, Istoday Function-judge is not the same day, judge is not today

unit Unit1; interface uses  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,  Dialogs, StdCtrls; type  TForm1 = class(TForm)   procedure FormCreate(Sender: TObject);  end; var  Form1: TForm1; implementation {$R *.dfm}

The function of modifying time in Delphi

Recodedatetime, Recodedate, Recodetime, recodeyear ... Modified Time DateUtils.RecodeDateTime(); DateUtils.RecodeDate(); DateUtils.RecodeTime(); DateUtils.RecodeYear(); DateUtils.RecodeMonth(); DateUtils.RecodeDay(); DateUtils.RecodeHour();

Delphi CALL WINAPI: Input cursor-related functions [3]

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

Delphi CALL WINAPI: Input cursor-related functions [2]

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

Delphi Call Winapi:queryperformancecounter

Statement:QueryPerformanceCounter(  var lpPerformanceCount: TLargeInteger {获取定时器每秒的频率数; TLargeInteger = Int64} ): BOOL; {返回 False 表示调用失败, 或者是硬件不支持高性能定时器} An interesting example: Determine the speed of your mouse clicks; My fastest record is 151

DELPHI Datasnap 2010 Getting Started (2) do not write a line of code, green three layer I can do

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

Delphi Call Winapi:getkeyboardtype

Statement: GetKeyboardType(  nTypeFlag: Integer {0:键盘类型; 1:键盘子类型; 2:功能键数量} ): Integer; Example: procedure TForm1.FormCreate(Sender: TObject); var  i: Integer;  List: TStringList; begin  List := TStringList.Create;  List.Add('IBM PC/XT or

Delphi Call Winapi:getdiskfreespaceex

Statement:GetDiskFreeSpaceEx(  lpDirectoryName: PChar;             {磁盘根路径}  var lpFreeBytesAvailableToCaller: TLargeInteger; {可用空间}  var lpTotalNumberOfBytes: TLargeInteger;     {总空间}  TotalFree: PLargeInteger             {剩余空间} ): BOOL; Example:

Delphi Call Winapi:getdiskfreespace

Statement:GetDiskFreeSpace(  lpRootPathName: PChar;       {磁盘根路径}  var lpSectorsPerCluster: DWORD;  {一个簇内的扇区数}  var lpBytesPerSector: DWORD;    {一个扇区内的字节数}  var lpNumberOfFreeClusters: DWORD; {剩余簇数}  var lpTotalNumberOfClusters: DWORD {总簇数} ): BOOL;

Delphi GDI + Learning records: MetaFile file operations

Show MetaFile file var  g: TGPGraphics;  img: TGPImage; begin  g := TGPGraphics.Create(Canvas.Handle);  img := TGPImage.Create('c:\temp\x.emf'); {文件要存在}  g.DrawImage(img, 11, 11);  img.Free;  g.Free; end; Drawing MetaFile Files var  g:

Delphi GDI + learning Record (a): Bitmap

displaying images with Bitmap var  g: TGPGraphics;  bit: TGPBitmap; begin  g := TGPGraphics.Create(Canvas.Handle);  bit := TGPBitmap.Create('c:\temp\x.jpg');  g.DrawImage(bit, 11, 11); {默认大小竟然和 1:1 不一样, 是不是分辨率的问题?}  g.DrawImage(bit, 11, 11,

Delphi GDI + learning Record (25): Transform

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,

Delphi GDI + Learning Records (22): Output text <1>

Output textvar  g: TGPGraphics;  sb: TGPSolidBrush;  fontFamily: TGPFontFamily;  font: TGPFont; begin  g := TGPGraphics.Create(Canvas.Handle);  sb := TGPSolidBrush.Create(MakeColor(0,0,255));  fontFamily := TGPFontFamily.Create('宋体');  font :=

Delphi GDI + learning Record (20): Drawing quality

Drawing qualityvar  g: TGPGraphics;  p: TGPPen; begin  g := TGPGraphics.Create(Canvas.Handle);  p := TGPPen.Create(MakeColor(255,0,0),2);  g.SetSmoothingMode(SmoothingModeHighQuality); {高质量}  g.DrawLine(p,11,11,111,111);

Delphi GDI + learning Record (18): Closed curve

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

Delphi GDI + learning Record (17): Curve

Draw curvevar  g: TGPGraphics;  p: TGPPen;  pts: array[0..4] of TGPPoint; begin  g := TGPGraphics.Create(Canvas.Handle);  p := TGPPen.Create(MakeColor(255,0,0),4);  pts[0].X := 11; pts[0].Y := 11;  pts[1].X := 66; pts[1].Y := 66;  pts[2].X :=

Delphi GDI + Learning Records (12): Rectangular

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,

Delphi GDI + learning Record (7): Solid painting brush

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:

Delphi GDI + Learning Records (5): Composite brushes

Composite brushes var  g: TGPGraphics;  p: TGPPen;  arr: array[0..9] of Single; {10 个元素可以分成 5 条线, 每条线需要起点和终点} begin  g := TGPGraphics.Create(Canvas.Handle);  p := TGPPen.Create(MakeColor(255,255,0,0),100); {笔宽定为 100 好算帐}  arr[0] := 0.00; {第一条线起点}

Delphi calls WINAPI characters and String functions (11)

Lstrcpyn-Copies the string, specifying the length to copy Unit Unit1; interface uses  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,  Dialogs, StdCtrls; type  TForm1 = class(TForm)   Button1: TButton;   procedure Button1

Total Pages: 64722 1 .... 44626 44627 44628 44629 44630 .... 64722 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.