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.