Tscreen class-use screen. cursors

Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls, extctrls; Type tform1 = Class (tform) timer1: ttimer; {requires a timer} procedure formcreate (Sender: tobject); Procedure

For Loop example

Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls; Type tform1 = Class (tform) button1: tbutton; button2: tbutton; button3: tbutton; button4: tbutton; Procedure submit (Sender:

Delphi Embedded Assembly [4]-use of registers in processes and functions

The CPU provides many registers, but in the Delphi Process and function, only the eax ECx edX three registers can be used freely; If other registers are changed, the process and function should be restored before the end. Remember that the

Delphi Embedded Assembly [10]-function return value and register

Return type Storage location Char, byte Al register Smallint, word Ax register Integer, longword, ansistring, pointer, Class Eax register Real48 The eax register is a pointer to the

Delphi Embedded Assembly for beginners [11]-rewrite a Delphi function with Assembly

// Delphi function delphifun (X: integer): integer; begin result: = x * 2; end; // assembler function, function asmfun (X: integer): integer; ASM add eax, eax {eax can obtain the first parameter and return the value of the function, so it can be so

Winapi: drawcaption-draw the title bar

// Declaration: drawcaption (P1: hwnd; {window handle} P2: HDC; {Device environment handle} const P3: trect; {rectangle} P4: uint {Option }): bool; // optional values of the P4 parameter: dc_active = 1; {use the color of the Activity title bar}

Delphi Embedded Assembly for beginners [25]-calling functions in assembly

// Prepare the function delphifun (X, Y: integer): integer; begin result: = x + y; end; // compile the function asmfun: integer; ASM mov eax, 1 {eax corresponds to the first parameter of the function. Here we assign the first parameter 1} mov edX, 2

Delphi Embedded Assembly for beginners [28]-Three methods and efficiency of setting eax value to 0

// The functions of the following three functions are the same, but the efficiency is different {fun1 needs to read constant 0, slowest} function fun1: integer; ASM mov eax, 0end; {fun2 and fun3 are only the registers that operate the CPU, which are

Tmainmenu class [2]-member list

Category Name Function Function Dispatchcommand Call the click method of a menu item Dispatchpopup Simulate the pop-up menu Finditem Find menu items Gethelpcontext Get

Winapi: getdiskfreespace-Get disk organization and capacity information

// Declaration: getdiskfreespace (lprootpathname: pchar; {disk root path} var l1_ctorspercluster: DWORD; {number of sectors in a cluster} var lpbytespersector: DWORD; {number of bytes in a sector} var lpnumberoffreeclusters: DWORD; {number of

Tmainmenu [3]-manually create a menu (4): Add a split line and hide excess split lines

Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, menus; Type tform1 = Class (tform) Procedure formcreate (Sender: tobject ); end; var form1: tform1; implementation {$ R *. DFM} var mymenu:

Tmainmenu [3]-manually create a menu (6): change the menu

Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, menus, stdctrls; Type tform1 = Class (tform) button1: tbutton; button2: tbutton; procedure invoke (Sender: tobject); Procedure button1click

Winapi: createdirectory-create a folder

// Declaration: createdirectory (lppathname: pchar; {directory name} lpsecurityattributes: psecurityattributes {tsecurityattributes structure pointer}): bool; // tsecurityattributes is the redefinition of the _ security_attributes structure _

Winapi: settimer, killtimer-create and remove high-performance timers

// Declaration of creating a timer function: settimer (hwnd: hwnd; {window handle associated with the timer} nidevent: uint; {specify a non-0 timer identifier} uelapse: uint; {specified interval, in milliseconds} lptimerfunc: tfntimerproc {pointer

Winapi: getcharwidth and getcharwidth32-get the character width

// Declaration: getcharwidth (DC: HDC; {Device environment handle} firstchar, lastchar: uint; {The first and last character values in the range} const widths {an integer array that accepts the width of each character}): bool; getcharwidth32 (DC: HDC;

Winapi: polyline-draw a group of consecutive Line Segments

// Declaration: polyline (DC: HDC; {Device environment handle} var points; {point array} count: INTEGER {Number of array elements}): bool; {polyline and polygon have the same parameters, but polygon can be automatically closed} // Draw a

Winapi: createpen-create a paint brush

// Declaration: createpen (style, width: integer; {style and pen width} color: colorref {color}): Hpen; {return pen handle} // optional value of the style parameter: ps_solid = 0; {solid line} ps_dash = 1; {segment line; required width // example:

Use tstringgrid [5]-fixedcols, fixedrows, color, and fixedcolor

In this example, run: // Example Code : Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, classes, extctrls, grids; Type tform1 = Class (tform) stringgrid1: tstringgrid; panel1:

Delphi Embedded Assembly [21]-other integer types of Delphi

Besides byte, word, Cardinal, and integer, the integer types of Delphi include: Longint, longword, shortint, smallint, int64 Among them, longint is equivalent to integer; longword is equivalent to Cardinal. There are three types as follows:

Understanding Delphi classes (11)-in-depth methods in classes [5]-static methods, class methods, static class methods

// The static method is default. If it is not a virtual method or pure virtual method, it is a static method. // The class method is the unit unit1 method that can be accessed through the class name; interfaceuses windows, messages, sysutils,

Total Pages: 64722 1 .... 54255 54256 54257 54258 54259 .... 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.