Kaprice
asked on
Visual Studio: Copy control WITH all code?
In Visual Studio (2013, if it matters), is there a way to copy a control from one form to another and include all the code attached to that control? (IOW, all code that exists for every event.)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Eric, that's a pretty impressive tool with a ton of features. I'll consider that.
ASKER
So, you're saying rather than code events directly in the control's event, I should put all the code in a class and then just refer to the class in the control's event? And, doing that means no need to duplicate code if I need it in multiple forms, yes?
Can you share a snippet of how I would use, for example, your ButtonHover class on a button in my WinForm?
And, I assume I'd have one class for each event I needed to use more than once?