Winapi: midiinopen-enable the MIDI input device

Tip: Because the callback function is accessed during the interruption time, it must be in the DLL; the data to be accessed must be in a fixed data

Array and enumeration

Type tmyenum = (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday); {definition enumeration} var weekarr: array [tmyenum] of string; {definition array} myenum: tmyenum; {defines enumeration variables} begin {array assignment} weekarr

Tscreen-number of forms in the program

// An example containing two forms: Program project1; uses forms, unit1 in 'unit1. PAS '{form1}, unit2 in 'unit2. PAS '{form2}; {$ R *. res} begin application. initialize; application. mainformontaskbar: = true; application. createform (tform1, form1

Example of getting started with classes (3): create and destroy

// Class unit person; interfaceuses dialogs; Type tperson = Class (tobject) Private fname: string; Fage: integer; Public constructor create (strname: string; intage: integer ); destructor destroy; override; function getname: string; function getage:

API function: getcursorpos and conversion

// Obtain the current position of the mouse in the form procedure tform1.formmousedown (Sender: tobject; button: tmousebutton; shift: tshiftstate; X, Y: integer); var STR: string; begin STR: = format ('% d, % d', [x, y]); showmessage (STR); end; //

Getting started with classes (7): traverse all parent classes of a form

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:

Tmainmenu [3]-manually create a menu (5): Add an event to the menu item

unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, menus; Type tform1 = Class (tform) procedure formcreate (Sender: tobject); Procedure proc (Sender: tobject); {declare the method to be

Tmainmenu [3]-manually create a menu (7): Specify the shortcut key

The shortcut menu item uses the shortcut Cut attribute to set the shortcut key. Shortcut cut is of the tshortcut type, and tshortcut is a subfield: 0 .. 65535. All optional values for shortcut are listed in: http://www.cnblogs.com/del/archive/2008/0

Winapi: getwindowtext-get window title

// Declaration: getwindowtext (hwnd: hwnd; {window handle} lpstring: pchar; {pointer to the buffer for Receiving text} nmaxcount: INTEGER {specify the buffer size, which contains null characters; if the text exceeds the limit, it will be truncated.})

Non-type file read/write

Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls; Type tform1 = Class (tform) memo1: tmemo; button1: tbutton; handler: tbutton; button3: tbutton; button4: tbutton; button5:

Winapi: drawtext-draw text to the specified rectangle

// Declaration: drawtext (HDC: HDC; {Device handle} lpstring: pchar; {text} ncount: integer; {number of characters to be drawn;-1 indicates all} var lprect: trect; {rectangular structure} uformat: uint {Option}): integer; {returned text height} //

Understanding Delphi classes (10)-in-depth methods [25]-use method types

// To understand this, use the callback function {define method type} type tfuntype = function (X: integer): integer; {function type} tproctype = procedure (Name: string); {process type} {define a function that meets the tfuntype} function myfun (X:

Delphi regular expression syntax (10): Option

// Precaseless: case-insensitive, equivalent to Ivar REG: tperlregex; begin REG: = tperlregex in other languages. create (NiL); Reg. subject: = 'abc ABC abc'; Reg. regEx: = 'abc'; Reg. replacement: = '◆ '; Reg. options: = [precaseless]; // The

Learning structure [Record] type (9)-Variant Structure

The variant structure, that is, the variant record, is a complicated concept and is not recommended by experts. I want to figure it out. The maximum cardinal is 4294967295, which is 4 bytes in size and its binary representation is:11111111 111111

Delphi regular expression syntax (7): matching escape characters

//? The meaning of the number is to match 0-1 times, if you need to match? How to Do var REG: tperlregex; begin REG: = tperlregex. Create (NiL); Reg. Subject: = 'Are you fine? Okay! '; Reg. RegEx: = '\? |! '; // Escape \ Reg. replacement: = '◆ ';

Detailed description of the xmldocument class in Delphi (14)-Traversing XML files

Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, xmldom, xmlintf, msxmldom, xmldoc, stdctrls; Type tform1 = Class (tform) xmldocument1: txmldocument; button1: tbutton; button2: tbutton;

Delphi control camera

Delphi's camera control is very simple. All the underlying messaging functions have been defined in the system, Windows, and messages units. We only need to call them reasonably. I made the related operations of the camera into a control, so that

Application of OPC in automated control system

During this period of time, I have been working on Industrial Automatic Control Projects. What I use is SiemensAt that time, the host computer used Siemens WinCCThe change of C in use is intolerable and cannot be called modern software without event-

Virtual key code table

Virtual key code Corresponding value Corresponding Key Vk_lbutton 1 Left mouse button Vk_rbutton 2 Right-click Vk_cancel 3 Cancel Vk_mbutton 4 Middle mouse Vk_xbutton1 5

Colors in Delphi

// Example in Red: // 1. RGB mode: Self. Color: = $ 0000ff; // However, It is opposite to # ff0000 in HTML and should be called BGR. // 2. RGB score, for example: Self. Color: = RGB (255, 0, 0 ); // 3. standard mode in Delphi: Self. color: = $ 0000

Total Pages: 64722 1 .... 27094 27095 27096 27097 27098 .... 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.