| |

VerySource

 Forgot password?
 Register
Search
View: 1468|Reply: 9

How to pass data between Forms

[Copy link]

4

Threads

10

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 Taiwan

Post time: 2020-2-19 21:30:01
| Show all posts |Read mode
Form1 has fields for entering names

And I want to appear to Form2 ... (EDIT or Label)

How can such program code be implemented?

Thank you
Reply

Use magic Report

0

Threads

22

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-4-27 17:15:01
| Show all posts
#include "Unit1.hpp"

Edit1-> Text: = Form1-> Edit1-> Text;
Reply

Use magic Report

0

Threads

22

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-4-27 17:30:01
| Show all posts
It is two, I thought it was wrong.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-4-28 00:45:02
| Show all posts
": =" Pascal?
Reply

Use magic Report

0

Threads

27

Posts

24.00

Credits

Newbie

Rank: 1

Credits
24.00

 China

Post time: 2020-4-28 23:45:02
| Show all posts
that's it
Reply

Use magic Report

0

Threads

11

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-5-12 17:15:01
| Show all posts
Yes pascal
You can also write a function in unit1, specifically output this value, and call this function in unit2
Reply

Use magic Report

0

Threads

15

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-5-12 21:00:01
| Show all posts
Remember to include the FORM1 header file.
Reply

Use magic Report

4

Threads

10

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 Taiwan

 Author| Post time: 2020-6-26 15:30:01
| Show all posts
Sorry
Don't understand
Will the program code be posted there...
-----------------------------------
#include "Unit1.hpp"
Edit1->Text := Form1->Edit1->Text;
-----------------------------------
Greatly
I want to realize the data entered by Form1 in the label of Form2
Reply

Use magic Report

0

Threads

4

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-20 12:45:01
| Show all posts
#include "Unit1.hpp" is pasted in the cpp file header of Form2, Edit1->Text := Form1->Edit1->Text; is pasted in the FormShow() event in the cpp file of Form2.
Reply

Use magic Report

0

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-7-20 16:00:01
| Show all posts
In fact, it depends on which one you call. Generally speaking, Form pointer definitions are global variables
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