ZT: Delphi incoming metadata: 2 Basic Windows program

Source: Internet
Author: User
?

Basic Windows program

 

2.1 selected orders

 

  • Open a new example and select file | new application.
  • Join
  • Mainmenu component.

  • Zookeeper
  • Mainmenu component to openSelect Design Tool.

 

  • The method for adding a candidate is as follows:CaseExample)
  1. The name of the admission ticket: Fill in "case (& F)" in the caption field, and change the feature name to "mifile1 」.
  2. Next, select the new branch under the case in the simple design tool.
  3. Fill in the caption section with "Start case (& n)" and change the feature name to "minew1 」.

 

 

 

  • Commonly used billing method for design and selection
  1. INS Selection: Add a new selection on the left or top of the selection.
  2. Del elect: remove the current options.
  3. CTRL + DEL align: select a blank selection.
  4. CTRL + → orders: Insert a new nest ticket.

 

 

  • Follow the steps above to complete the selection of the statement in the following table.

 

Caption

Name

Shortcut

Case

(& F)

Mifile1

 

Opening a new project

(& N)

Minew1

 

Enable Elastic Compute Service

(& O)

Miopen1

CTRL + O

Inventory case

(& S)

Misave1

CTRL + S

Save a new shard

(&)

Misaveas1

CTRL +

-

N1

 

Print

(& P)

Miprint1

CTRL + P

Printer settings

... (& R)

Miprisntsetup1

 

-

N2

 

End

(& X)

Miexit1

CTRL + x

 

  • Specify the acceleration region

(Accelerator key): add the "&" character before the letter of the quick start, for example, Case (& F ).

  • Specify a shortcut

(Sort cut): in the selected sort cut feature, specify the sort-based combination.

  • Specify the separator: In
  • In the caption feature, click 「-」.

     

    • Insert an option from the same version: Right-click the mouse and select 「

    Insert from template ...」. We can insert a selection in the same version before adding a selection to meet our needs.

     

    • Other options
    • CauseCaseRight-click AdditionZookeeperOptional. InSelect Design ToolIn, right-click the mouse and select 「

    Insert from template ...」, Then select "sequence functions" and press OK to insert.

  • CauseZookeeperRight-click AdditionZookeeperSelect the table and add two options as follows.
  •  


    Caption

    Name

    Checked

    Show Tool Columns

    (& T)

    Miviewtoolsbar

    True

    Displays the sequence columns.

    (& S)

    Miviewstatusbar

    True

     

    • CauseZookeeperRight-click AdditionDescriptionOptional.
    • RelationshipSelect Design Tool.

     

     

    2.2 configure as a tool column

     

    2.2.1 compile method as a tool column

    • Add the bevel element (in the additional partition or the component list partition window is opened by alt_vl), align = altop, Height = 4, shape = bstopline.
    • Join
    • Panel component, align = altop, bevelout = bvnone, clear caption.

    • Join
    • Scrollbox, align = alclient, color = clwindow.

    • Join
    • 8 speedbuttons and their features are changed according to the following table. The BMP sequence required for glyph can be found in Delph 3/images/buttons.

     

    Name

    Left

    Top

    Enabled

    Glyph

    Sbnew

    0

    2

    True

    Filenew. BMP

    Sbopen

    25

    2

    True

    Fileopen. BMP

    Sbsave

    50

    2

    True

    Filesave. BMP

    Sbcut

    85

    2

    False

    Cut. BMP

    Sbcopy

    110

    2

    False

    Copy. BMP

    Sbpaste

    135

    2

    False

    Paste. BMP

    Sbprint

    170

    2

    True

    Print. BMP

    Sbhelp

    195

    2

    True

    Help. BMP

     

     

    2.2.2 use the tool column component alias as the tool column

     

    • Add toolbar.

     

    • There are five types of styles, except that style features are different.
    1. Button (style = tbsbutton): Generally, press upload.
    2. Separator: does not respond to the mouse.
    3. Divider: similar to a separator, which is used to separate partitions in bytes.
    4. Check: When you press the button, the system will stop and then press the button again.
    5. Dropdown: displays the selections specified by dropdownmenu when you press the button.

     

    • Press the right button to select the new button. Use the new button to add three buttons and one separator, then add three buttons, one separator, and the last two buttons.
    • Set Tool Columns
    • Set the flat attribute to true. (This is a new type of manual setting. When the mouse is pressed, it will automatically display it)

    • Join
    • Imagelist component.

    • Zookeeper
    • Imagelist is used to activate the imagelist compiler and add the first eight images in sequence .. (When the browser requires dividing it into two groups, the answer is yes, and then it will be ineffective)

    • Set this
    • Imagelist is specified in the Image Feature of the tool column.

    • Pending
    • Set the enabled feature of cut, copy, and paste buttons to false.

     

     

    2.3 sort as the sort column

     

    • Change the align of scrollbox to alnone, and move it up a bit, leaving blank space for statusbar. Then add the statusbar component.
    • Set
    • In scrollbox, align returns to alclient.

     

    • InObject inspectorThe statusbar panels are found, and the cursor is omitted from the right button. A corresponding Speaker of the Status panels editor is displayed.
    • Quota quota five times
    • Add by region, set the priority of the first region to 250, with a limit of 50, the text of the first four regions is set to "ready", "num", "cap", and "scrl 」.

     

     

    2.4 responding to Windows events

     

    • Compile the event handling program: first locate the objects related to the event, then locate the event to be handled, and finally add the program handler to the event. The steps are as follows:

    1. Select the component to be processed.

    2. Locate the event to be handled in the event handler, and then click the feature handler of the right listener. At this time, Delphi adds the beginning and end of the self-generated event processing program to the declaration part of the different processing program.

    3. Program worker that joins the processing program.

     

    2.4.1CaseSelectionsEndSelect the program and add the event handling program.

     

    • StartSelect Design Tool.

    • Select the onclick event in the events program, and then click the blank area in the right pane to generate the event processing program.

    • Add Table objects to the program
    • Close method.

     

    Procedure tform1.exit1click (Sender: tobject );

    Begin

    Close;

    End;

     

    • Renewal itinerary.

     

    2.4.2 event handling procedures for ticket Selection

     

    • InSelect Design Tool.ZookeeperSelect the first category 『Show Tool Columns』.

    • Add the following program example

     

    Procedure tform1.miviewtoolsbarclick (Sender: tobject );

    Begin

    // Reverse selection of the entire display tool column

    Miviewtoolsbar. Checked: = Not miviewtoolsbar. checked;

    // Determine whether to display the tool column according to the selected method.

    Toolbar1.visible: = miviewtoolsbar. checked;

    End;

     

    • OptionalZookeeper

    | Shows the tool column "strongswan.

    • Use the same methodZookeeper

    | Indicates that the processed program is added to the processed program column.

     

     

    2.4.5 The Helper helper tool provided by Delphi: Code insight

     

    • Code Completion, delphi lists all the features, methods, and events of an object.

     

    • Code parameters: when calling the login method, wait a moment after the login enters the left arc, delphi lists all the metric data of the method and its type.

     

     

    • Code Template: press Ctrl + J. Delphi will list all the predefined program versions.

     

    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.