Change WinForm form control value in class

Time:2020-10-21

1. Define it first this time

public static AOC aoc = null; 

 aoc = this;

2. Write in form Control.CheckForIllegalCrossThreadCalls = false;

 private void Form1_Load(object sender, EventArgs e)
        {
            Control.CheckForIllegalCrossThreadCalls = false;
        }

3. Change the modifier property of the control to change the value to public

 

4. How to use in a class

AOC.aoc . control; (for example: AOC.aoc.progressBar1 .Value=10;)

 

Recommended Today

Api: tiktok: user video list

Tiktok tiktok, tiktok, tiktok, Api, Api, jitter, voice, bullet screen comments, jitter, jitter, and jitter. Tiktok tiktok tiktok data, jitter data acquisition, live broadcast of shaking sound Titodata: professional short video data acquisition and processing platform. For more information, please contact:TiToData Massive data collection Collect 500 million pieces of data for customers every day Tiktok […]