Yeah, the documentation of the Designer namespace is sparse, and that is the
I recycle.
"Stoitcho Goutsev (100)" <100@100.com> wrote in message
news:ezNgIGUlGHA.4308@TK2MSFTNGP05.phx.gbl...
> Kevin,
>
> What Wieser wants is to design the control (context menu) as he designs
> user control let say - saparately outside the context of any class. Only
> controls that provide root designer can do that. Even thought it can be
> done it won't be by simply deriving from the ContextMenu class.
>
> One can create a component or a control and it can be reused, but the
> think is that it needs to be placed on a form or user control in order to
> be desigened. Nothing is lost; the design time experience and reusability
> is still there and this is what I tried to explain.
>
> I kind of disagree that implementing the design time support is the
> hardest part. Working myself in a component company I'd say that the
> design time support is one smller part of the whole control development.
> The only difficulty comes from the fact that MSDN doesn't privde good
> documentation on it, but thanks to the Reflector tool the things are not
> that bad.
>
>
> In addition to the sources that Kevin provided I'd add the
> the windows forms official site
http://www.windowsforms.net/ and more ints
> section for desgners
>
http://www.windowsforms.net/Articles/default.aspx?PageID=1&Cat=Designer&ModuleFilter=131&tabindex=2 >
>
> Kevin you are right, though, one should not believe everything one reads
> on the net.
>
>
> --
> Stoitcho Goutsev (100)
>
> "Kevin Spencer" <uce@ftc.gov> wrote in message
> news:eRLSD7RlGHA.3740@TK2MSFTNGP02.phx.gbl...
>>> So, if I want to reuse something, I have to copy and paste it onto the
>>> other
>>> form, and double my localization and maintenance work? I think I
>>> understand
>>> the concept of visual design and RAD, but the motivation? That's
>>> another
>>> matter altogether.
>>>
>>> I had hoped that C# etc wasn't just for building throw away prototypes,
>>> and
>>> could be used to build a long lasting, maintainable product. Maybe I
>>> was
>>> mistaken.
>>
>> Don't believe everything you read. It is certainly possible to do exactly
>> what you want. You can create a class that inherits
>> System.Windows.Forms.ContextMenu, just as you would inherit any other
>> inheritable class, customize the derived class, and use it in many
>> projects. I have done this myself many times. There are quite a few (too
>> many IMHO) .Net developers that do not understand the underlying
>> technology involved in the Visual Studio GUI, and its design-time
>> support, which is fully available to developers for developing their own
>> designers and design-time components, with all the support that the
>> out-of-the-box components provide. They do not seem to realize that all
>> Visual Studio does is write code for you, which you can perfectly well
>> write for yourself.
>>
>> Basically, you have 2 different issues, one of which is a piece of cake.
>> First, inheriting and customizing a Control. That part should not be
>> difficult at all for you.
>>
>> The second task is providing design-time support for your Control. This
>> is the hard part, as it basically involves developing another class or
>> classes to interact with the GUI and provide the visual support, and of
>> course, there are no designers for these classes. But coming from a C++
>> background, this shouldn't be difficult for you. Getting familiar with
>> all of the classes involved is going to be the real work.
>>
>> Here are several reference points to start from. The first is more or
>> less an overview, with some walkthroughs and examples:
>>
>>
http://msdn2.microsoft.com/en-us/library/w29y3h59(VS.80).aspx
>>
>> This second reference point gets a bit deeper into the Component Model,
>> and includes another section on developing Designers for Components:
>>
>>
http://msdn2.microsoft.com/en-us/library/0ffkdtkf(VS.80).aspx
>>
>> Finally, here is a link to the documentation for the
>> System.ComponentModel.Design Namespace, which contains all of the classes
>> needed to develop Designers and Design-time support for Components:
>>
>>
http://msdn2.microsoft.com/en-us/library/system.componentmodel.design.aspx >>
>> Good luck!
>>
>> --
>> HTH,
>>
>> Kevin Spencer
>> Microsoft MVP
>> Professional Chicken Salad Alchemist
>>
>> I recycle.
>> I send everything back to the planet it came from.
>>
>>
>>
>>
>> "A Wieser" <me@wieser.plush.com> wrote in message
>> news:eJF%23I8KlGHA.1456@TK2MSFTNGP04.phx.gbl...
>>>
>>> "Stoitcho Goutsev (100)" <100@100.com> wrote in message
>>> news:OeXPLNHlGHA.5072@TK2MSFTNGP04.phx.gbl...
>>> |A Wieser,
>>> |
>>> | ContextMenuStrip is a control that cannot be edited outsude if the
>>> context
>>> | of a form (or user control). It needs to be placed on some design
>>> surface
>>> in
>>> | order to be edited.
>>> |
>>> | I have the feeling that coming from MFC you don't understand the
>>> consepts
>>> of
>>> | visual design and RAD applications. I think you should start from
>>> there.
>>> |
>>>
>>> So, if I want to reuse something, I have to copy and paste it onto the
>>> other
>>> form, and double my localization and maintenance work? I think I
>>> understand
>>> the concept of visual design and RAD, but the motivation? That's
>>> another
>>> matter altogether.
>>>
>>> I had hoped that C# etc wasn't just for building throw away prototypes,
>>> and
>>> could be used to build a long lasting, maintainable product. Maybe I
>>> was
>>> mistaken.
>>>
>>> Tony
>>>
>>
>>
>
>