K
Kristian Frost
Hi, me again,
I'm trying to create a User Control in VS2003 that takes an object as an
argument from its parent form and designs itself accordingly.
At the moment, I'm having to create a default, empty constructor method
and then adjust the size later by sending in the argument in a later
method and then resizing everything, instead of simply creating things
according to these arguments in the first place.
Obviously, seeing as the whole design of the User Control is based on the
object I'm feeding it, I'd prefer to feed the object directly into the
constructor, but doing that involves altering that part of the code that
Visual Studio tells you not to (the InitializeComponent() method) and
which throws an absolute, utter fit whenever I have done.
These work fine as workarounds go, but I really would prefer to simply
have a constructor for the User Control that takes an argument.
Perhaps this would be better put into the microsoft.public.vstudio.general
newsgroup, seeing as this seems to be all VS's fault for rewriting my code
and throwing fits and stuff, but as that looks utterly dead, I thought I'd
try here first.
Any advice, or I do stick to my workarounds?
KF
I'm trying to create a User Control in VS2003 that takes an object as an
argument from its parent form and designs itself accordingly.
At the moment, I'm having to create a default, empty constructor method
and then adjust the size later by sending in the argument in a later
method and then resizing everything, instead of simply creating things
according to these arguments in the first place.
Obviously, seeing as the whole design of the User Control is based on the
object I'm feeding it, I'd prefer to feed the object directly into the
constructor, but doing that involves altering that part of the code that
Visual Studio tells you not to (the InitializeComponent() method) and
which throws an absolute, utter fit whenever I have done.
These work fine as workarounds go, but I really would prefer to simply
have a constructor for the User Control that takes an argument.
Perhaps this would be better put into the microsoft.public.vstudio.general
newsgroup, seeing as this seems to be all VS's fault for rewriting my code
and throwing fits and stuff, but as that looks utterly dead, I thought I'd
try here first.
Any advice, or I do stick to my workarounds?
KF