Head first C # Chinese Version chapter 13th controls and graphics page579

Source: Internet
Author: User

 

Because the form completes the work for you.


IDE overwrites it for you
Dispose
() Method, when the form is to be released, it will be released
Controls
All controls in the set. Now, if you want to create controls or remove them from the set, you need to release them yourself.



 

Q: Why does the form correspond to picturebox-based
Of
Beecontrol
The Code is also applicable
Usercontrol
Of
Beecontrol
?



A: Because the Code does not care about beecontrol
Is implemented. You can add it to
Controls
Set.



Q: Double-click oldbeecontrol.
Class, a message is displayed indicating whether to add components. What's going on?



A: When creating a new control by adding a class that inherits the control in the project, IDE
Will do something intelligent. One of them is to allow you to operate components. components are invisible controls. Create an inherited from
Picturebox
To regenerate the project. Double-click the class to see the message.



Drag an openfiledialog to the new class.
And set its attributes. View the constructor of this class in the code.
-- Ide
Initialize the task for you and set the attributes.



Q: Change openfiledialog
After the attribute,
IDE
The system prompts you to regenerate the project. Why?



A: Because the designer needs to run your control, it can only run the latest version of code after you regenerate it.

 


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.