Solution to the sudden disappearance of C # Form Controls

Source: Internet
Author: User

Today, I opened the C # project and found that all the controls in the form were missing. It was very strange. So I started to find the reason, but it still did not solve the problem. I am helpless. Come on, open it *. desigener. CS file. See form InitializationCode, I created a project, drew several controls on a form, and then added *. desigener. the initialization code in the CS file is compared with the error file, and the following sentence is missing:

Certificate --------------------------------------------------------------------------------------------------------------------------------------

This. Controls. Add (this. textbox10 );

Certificate --------------------------------------------------------------------------------------------------------------------------------------

Textbox10 is the name of my control. If it is yours, you can see the specific control.

After finding the problem, I added all the controls back. Save.

Open the window again-> solve the problem.

If you have not solved the problem, you should learn how to create a project... Then compare *. desigener. CS of the new file with the error file to see if there is no such change. In this way, you can.

I checked on the Internet and found that this should be a bug in C #. The poor C #, the bug C ++, And the bug C # cannot be escaped ......

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.