custom component (not control) showing as gray in toolbox

  • Thread starter Thread starter news.austin.rr.com
  • Start date Start date
N

news.austin.rr.com

Hi,

I have created several custom controls that i have in the toolbox and can
drag and drop onto forms with no problem. However, if I create a custom
component by inheriting from " System.ComponentModel.Component" and compile
the runtime and design time versions, the component appears but is grayed
out and not selectable from the toolbox.

Is there an extra step to create drag and drop components?

Thanks
 
thanks tim,

but when i try that my code compiles with no errors from VS but when i try
to build the designer dll, from the command line compiler using my batch
files i get the following error...

MyComponent.cs(9,1): error CS1518: Expected class, delegate, enum,
interface, or struct

i have 2 bat files i use to compile the design time dll, the first bat file
calls the second.

first bat file >>>
BUILDDES.BAT MyComponent.dll MyComponent.cs /o

second bat file >>>
csc /noconfig /define:NETCFDESIGNTIME /target:library /out:design.%1 %2 %3
%4 %5 /r:.\System.CF.Design.dll /r:.\System.CF.Windows.Forms.dll
/r:.\System.CF.Drawing.dll /r:System.Windows.Forms.dll /r:System.Drawing.dll
/r:System.dll /r:System.XML.dll /r:System.Web.Services.dll
/r:System.Data.dll /nowarn:1595
This compiles my designer controls with no problem but I get the error above
when i call the bat file to create the designer component dll. I do not get
an error when i compile the runtime version of the dll from VS.


Any ideas?


thanks
 
I need your help

I create a component, but when I drag the component and drop in form,
nothing happens.
 
Back
Top