A little knowledge about TabControl controls
When multiple TabPage pages are loaded on TabControl, only the active (that is, currently displayed) TabPage page will be active by default within TabControl, and the Visible property of other TabPage controls will be set to false;, especially when using the Visible property of some controls to determine the condition. So try not to use the Visible property of the control as a judgment condition on TabControl; you can add a global variable and use it instead of the judgment condition.