Help with custom control development

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all!

I am developing a custom control with design-time support.
I have managed to build the design time assembly without any errors.

However, when I add my control to the toolbox it appears disabled. I
understand that something is wrong but I cannot figure out what it is. Is
there any way to get more information on what is going on?

Do you know of any descent tutorials on control develpment (because MSDN's
documentation on this topic sucks!).

Thanks in advance!
 
Thanks Maarten, but I've allready read this article.

The truth is that this is the first CF control I develop and
I was expecting a little more help from the IDE.
It doesn't like it but it does not tell my why!
 
Since you've read the IntelliProg article, then you must have something like
that in your code:

#if NETCFDESIGNTIME
[assembly: System.CF.Design.RuntimeAssemblyAttribute("LabelControl,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")]
#endif

In your run-time library's AssemblyInfo file you should change the
AssemblyVersion attribute from "1.0.*" to "1.0.0.0" or whatever you have
specified inside the #if NETCFDESIGNTIME...#endif block.

I hope this helps.
 
Well, I've sticked to the article and I did declare a runtime assembly.
The funny thing is that today I tried adding my control to the toolbox of a
normal windows forms application (I mean non CF) and it works! I can't
beleive it!

It seems that Visual studio considers my control suitable for the normal but
not the compackt framework forms.

Am I missing something?

papppp said:
Since you've read the IntelliProg article, then you must have something like
that in your code:

#if NETCFDESIGNTIME
[assembly: System.CF.Design.RuntimeAssemblyAttribute("LabelControl,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")]
#endif

In your run-time library's AssemblyInfo file you should change the
AssemblyVersion attribute from "1.0.*" to "1.0.0.0" or whatever you have
specified inside the #if NETCFDESIGNTIME...#endif block.

I hope this helps.

Strider said:
Thanks Maarten, but I've allready read this article.

The truth is that this is the first CF control I develop and
I was expecting a little more help from the IDE.
It doesn't like it but it does not tell my why!
 
Did you check what I told you about the AssemblyVersion? I had exactly the
same problem and it worked for me. It seems that the VS IDE cannot find the
run-time version of your library and it cannot enable the control in the
Toolbox.

Strider said:
Well, I've sticked to the article and I did declare a runtime assembly.
The funny thing is that today I tried adding my control to the toolbox of
a
normal windows forms application (I mean non CF) and it works! I can't
beleive it!

It seems that Visual studio considers my control suitable for the normal
but
not the compackt framework forms.

Am I missing something?

papppp said:
Since you've read the IntelliProg article, then you must have something
like
that in your code:

#if NETCFDESIGNTIME
[assembly: System.CF.Design.RuntimeAssemblyAttribute("LabelControl,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")]
#endif

In your run-time library's AssemblyInfo file you should change the
AssemblyVersion attribute from "1.0.*" to "1.0.0.0" or whatever you have
specified inside the #if NETCFDESIGNTIME...#endif block.

I hope this helps.

Strider said:
Thanks Maarten, but I've allready read this article.

The truth is that this is the first CF control I develop and
I was expecting a little more help from the IDE.
It doesn't like it but it does not tell my why!

:

You might want to take a look at this article:
http://www.intelliprog.com/articles/index.html.

--
Regards,

Maarten Struys, eMVP
PTS Software bv

www.opennetcf.org | www.dotnetfordevices.com

Hello all!

I am developing a custom control with design-time support.
I have managed to build the design time assembly without any errors.

However, when I add my control to the toolbox it appears disabled. I
understand that something is wrong but I cannot figure out what it
is.
Is
there any way to get more information on what is going on?

Do you know of any descent tutorials on control develpment (because
MSDN's
documentation on this topic sucks!).

Thanks in advance!
 
Other things to check:
(1) Have you added the run-time version of the control to the "[VS.Net 2003
Install Dir]\CompactFrameworkSDK\v1.0.5000\Windows CE" directory?
(2) Have you added the design-time version of the control to the "[VS.Net
2003 Install Dir]\CompactFrameworkSDK\v1.0.5000\Windows CE\Designer"
directory?
(3) When you add the control to the ToolBox are you pointing to the
design-time version?

--
Tim Wilson
..Net Compact Framework MVP

Strider said:
Well, I've sticked to the article and I did declare a runtime assembly.
The funny thing is that today I tried adding my control to the toolbox of a
normal windows forms application (I mean non CF) and it works! I can't
beleive it!

It seems that Visual studio considers my control suitable for the normal but
not the compackt framework forms.

Am I missing something?

papppp said:
Since you've read the IntelliProg article, then you must have something like
that in your code:

#if NETCFDESIGNTIME
[assembly: System.CF.Design.RuntimeAssemblyAttribute("LabelControl,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")]
#endif

In your run-time library's AssemblyInfo file you should change the
AssemblyVersion attribute from "1.0.*" to "1.0.0.0" or whatever you have
specified inside the #if NETCFDESIGNTIME...#endif block.

I hope this helps.

Strider said:
Thanks Maarten, but I've allready read this article.

The truth is that this is the first CF control I develop and
I was expecting a little more help from the IDE.
It doesn't like it but it does not tell my why!

:

You might want to take a look at this article:
http://www.intelliprog.com/articles/index.html.

--
Regards,

Maarten Struys, eMVP
PTS Software bv

www.opennetcf.org | www.dotnetfordevices.com

Hello all!

I am developing a custom control with design-time support.
I have managed to build the design time assembly without any errors.

However, when I add my control to the toolbox it appears disabled. I
understand that something is wrong but I cannot figure out what it is.
Is
there any way to get more information on what is going on?

Do you know of any descent tutorials on control develpment (because
MSDN's
documentation on this topic sucks!).

Thanks in advance!
 
I must have the compiler command line arguments all wrong. I tried building
the designer assembly from a different project and it worked fine.

Thank you very much for your time!

papppp said:
Did you check what I told you about the AssemblyVersion? I had exactly the
same problem and it worked for me. It seems that the VS IDE cannot find the
run-time version of your library and it cannot enable the control in the
Toolbox.

Strider said:
Well, I've sticked to the article and I did declare a runtime assembly.
The funny thing is that today I tried adding my control to the toolbox of
a
normal windows forms application (I mean non CF) and it works! I can't
beleive it!

It seems that Visual studio considers my control suitable for the normal
but
not the compackt framework forms.

Am I missing something?

papppp said:
Since you've read the IntelliProg article, then you must have something
like
that in your code:

#if NETCFDESIGNTIME
[assembly: System.CF.Design.RuntimeAssemblyAttribute("LabelControl,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")]
#endif

In your run-time library's AssemblyInfo file you should change the
AssemblyVersion attribute from "1.0.*" to "1.0.0.0" or whatever you have
specified inside the #if NETCFDESIGNTIME...#endif block.

I hope this helps.

Thanks Maarten, but I've allready read this article.

The truth is that this is the first CF control I develop and
I was expecting a little more help from the IDE.
It doesn't like it but it does not tell my why!

:

You might want to take a look at this article:
http://www.intelliprog.com/articles/index.html.

--
Regards,

Maarten Struys, eMVP
PTS Software bv

www.opennetcf.org | www.dotnetfordevices.com

Hello all!

I am developing a custom control with design-time support.
I have managed to build the design time assembly without any errors.

However, when I add my control to the toolbox it appears disabled. I
understand that something is wrong but I cannot figure out what it
is.
Is
there any way to get more information on what is going on?

Do you know of any descent tutorials on control develpment (because
MSDN's
documentation on this topic sucks!).

Thanks in advance!
 
Back
Top