I've written a custom control. I need a public function from the parent form, the control is in. So I pass the instance in the designer like this:
this.control= new mainform.control(this);
But the VS designer throws an error ans says:
The variable 'control' is either undeclared or was never assigned.
This sounds like a designer issue to me. Just do;
As an alternative, you can create seperate assembly dll for custom controls.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.