This article is a mirror article of machine translation, please click here to jump to the original article.

View: 17038|Reply: 0

[WPF] C# Forms Pass Values Between Forms, the first form continuously passes values to the second form

[Copy link]
Posted on 12/18/2015 3:59:21 PM | | |
Well, let me first say roughly:

Form 1 first opens Form 2,

Then, after a while, Form 1 passes a value to Form 2 to change the value of a control in Form 2

No, open Form 2 and immediately pass the value.

On the Internet, many of them open form 2 in form 1, and then form 2 passes the value to form 1.

C# Forms Pass Values Between Forms, the first form continuously passes values to the second form

Define the form to the outside first

private MainWindow main = new MainWindow();

button 1, open form 2: main. Show();

button 2, change the value of a certain control in form 2: main.btn2.Content = "test";




Previous:A potentially dangerous Request.Form value was detected
Next:CSS files and js files are followed by a question mark
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com