Form files. DFM

Source: Internet
Author: User

Form file(Form files) Stores the binary information of the form.

Step 1. Create a New Delphi application in Delphi 【File | new | Application]. At this time, Delphi will create a form file (. DFM) and a unit file (. Pas) at the same time, such:

 

Step 2. OpenUnit1.pasForm unit file, you will see the following sentence:

{$ R *. DFM} {This sentence tells the compiler to connect the corresponding form file. The name is the same as the unit file, but the extension is. DFM}

 

Step 3. Let's take a look at what is in Form file. DFM? Right-click the form form1 designer and select 【View as text], Then the text of the form is displayed:

Have you noticed that 【Text DFM] Menu item. If checked, Delphi will save the form in text format.

 

Step 4. Check the content of the Form file. Is it very simple? It records some non-default attribute settings and some component attribute settings on the form.

Object form1: tform1 left = 376 {left and top coordinates of the form on the screen} Top = 207 width = 979 {width and height of the form} Height = 563 caption = 'form1' {Title of the form for form1} color = clbtnface {the form color is the button surface color} font. charset = default_charset {font attributes on the form, including character set, color, size, font name, style, etc.} font. color = clwindowtext font. height =-11 font. name = 'tahoma 'font. style = [] oldcreateorder = false pixelsperinch = 96 textheight = 13end

Tip: Be very careful when editing a Form file. If the operation fails, Delphi may not be able to open the Form file.

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.