| |

VerySource

 Forgot password?
 Register
Search
View: 2546|Reply: 11

I put a button on the form, and then view as text, I see the following code, which specific code is used to create the f

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-3 19:00:01
| Show all posts |Read mode
object Form1: TForm1
  Left = 192
  Top = 114
  Width = 696
  Height = 480
  Caption = 'Form1'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object Button1: TButton
    Left = 280
    Top = 128
    Width = 75
    Height = 25
    Caption = 'Button1'
    TabOrder = 0
  end
end
Reply

Use magic Report

0

Threads

53

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 China

Post time: 2020-1-3 20:30:01
| Show all posts
Of course, it is in Create. There is a CreateNew in Create of form.
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-5 19:33:01
| Show all posts
There is a CreateNew in the Create of form ??????
There is no CreateNew function
Reply

Use magic Report

0

Threads

53

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 China

Post time: 2020-1-6 12:03:01
| Show all posts
Yes, you check the speedbutton is useful
Reply

Use magic Report

0

Threads

53

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 China

Post time: 2020-1-6 12:09:02
| Show all posts
Sorry, the reply is not the place, the wrong place
The form is there, check it out
Reply

Use magic Report

0

Threads

53

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 China

Post time: 2020-1-6 15:57:01
| Show all posts
Halo wrong, I thought you were asking about these property settings for the form
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-2-11 02:15:01
| Show all posts
Ha ha. Upstairs reply three times in a row. The system is over. .

It should be used when the form is created.
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-11 13:45:01
| Show all posts
When you place a control on a form, its Create will be called, and then its ancestor's Create method will be called. The control derived through TPersistent has the function of object storage, so it will store its basic properties. To disk. These attributes are listed by you.
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-11 14:30:01
| Show all posts
It is recommended to take a look at the instructions in the InSide VCL.
Reply

Use magic Report

0

Threads

9

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-2-14 15:15:01
| Show all posts
I do n’t know which part you are talking about, if it is the whole, then the code is executed when the window instance is created (Create)

These codes are saved in the dfm file created by Delphi. You will see the following line in the pas file of the window
{$ R * .dfm}
This is to call the dfm file creation window with the same name as the pas file. In some applications, you can create another dfm file to implement the same interface with different code.

Specifically through CreateNew
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list