Learning message (3): Responding to wm_lbuttondown messages

In this example: Code File: Unit unit1; interfaceuses windows, messages, extensions, variants, classes, graphics, controls, forms, dialogs, stdctrls; Type tform1 = Class (tform) memo1: tmemo; Procedure formcreate (Sender: tobject)

Learn message (8): use different message structures

The following is the same four paragraphs Program However, three message structures are used: Twmmousemove, twmmouse, tmessage Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs;

Learn more about GDI + [7]: drawlines-draw a set of straight lines

In this example: Code File: Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls; Type tform1 = Class (tform) button1: tbutton; button2: tbutton; procedure

GDI + Learning Record (1): Brush-pen

// Brush var G: tgpgraphics; P: tgppen; begin G: = tgpgraphics. create (canvas. handle); P: = tgppen. create (aclred, 2); {parameter 1 color; parameter 2 is the pen width, and the pen width is optional. The default value is 1} G. drawellipse (p, 11,

View the hex of a string in different encodings (ASCII, Unicode, utf7, utf8, default, and bigendianunicode ).

In this example: Code File: Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls, extctrls; Type tform1 = Class (tform) memo1: tmemo; memo2: response; Panel1:

GDI + Learning Record (12): rectangle-rectangle, rectangles

// 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,

Learn official examples-system. Hi, system. Lo

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

Learn more about GDI + [9]: drawpolygon-draw a polygon

In this example: Code File: Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls; Type tform1 = Class (tform) button1: tbutton; button2: tbutton; procedure

Differences between components and controls

In this example: Code File: Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls, extctrls; Type tform1 = Class (tform) Panel1: tpanel; edit1: tedit; button1:

GDI + Learning Record (22): output text

// Output text var G: tgpgraphics; SB: tgpsolidbrush; fontfamily: tgpfontfamily; Font: tgpfont; begin G: = tgpgraphics. create (canvas. handle); SB: = tgpsolidbrush. create (makecolor (255,); fontfamily: = tgpfontfamily. create (' '); Font: =

Learn more about GDI + [8]: drawrectangles-draw a group of rectangles

In this example: Code File: Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs; Type tform1 = Class (tform) Procedure formpaint (Sender: tobject ); procedure formresize

Winapi: beginpath, endpath, strokepath, fillpath, strokeandfillpath

Beginpath {path start} endpath {path end} strokepath {drawing path} fillpath {fill path} strokeandfillpath {draw and fill path} // graphic commands available in the path include:

GDI + Learning Record (15): Polygon

// Polygon stroke and fill 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,

GDI + Learning Record (26): display image-Image

// Display the image var G: tgpgraphics; IMG: tgpimage; begin G: = tgpgraphics. create (self. canvas. handle); IMG: = tgpimage. create ('C: \ temp \ x.jpg '); G. drawimage (IMG, 10, 10); {parameters 2 and 3 are coordinates} IMG. free; G. free; end;

Learn message (7): onmessage only refers to messages in the corresponding message queue

Perform and sendmessage directly send messages to the form; Postmessage puts a message into a message queue. Because application. onmessage only receives messages in the queue,Therefore, the message sent by perform and sendmessage cannot be

Functions that use the tbytesstream class to read files with hexadecimal characters

In this example: Code File: Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls; Type tform1 = Class (tform) memo1: tmemo; memo2: tmemo; button1: tbutton;

Drop-down menu on toolbar buttons-I didn't expect it to be so easy to implement

Procedure: 1. Add a timagelist: imagelist1 and load some icons; 2. Add two tpopupmenu: popupmenu1 and popupmenu2, and add some menu items respectively; 3. Add a ttoolbar control: toolbar1. Right-click the control and choose new button from the

GDI + Learning Record (4): Brush alignment

// Pen alignment var G: tgpgraphics; P: tgppen; SB: tgpsolidbrush; rect: tgprect; begin G: = tgpgraphics. create (canvas. handle); P: = tgppen. create (makecolor (255,255,), 5); SB: = tgpsolidbrush. create (makecolor (255,255,255, 0); p.

GDI + Learning Record (3): dotted brush-dash

// Dotted line style var G: tgpgraphics; P: tgppen; begin G: = tgpgraphics. create (canvas. handle); P: = tgppen. create (makecolor (255,255,), 3); G. drawline (p, 11, 11,333, 11); {solid line} p. setdashstyle (dashstyledashdot); {set the dotted

Controls attributes and small exercises inheriting the tshape class

In this example: Code file: Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls, extctrls; Type tmyshape = Class (tshape) protected procedure cmmouseenter (VAR message: tmessage);

Total Pages: 64722 1 .... 54251 54252 54253 54254 54255 .... 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.