A
Andreas Håkansson
I followed the tutorial at http://www.intelliprog.com/articles/index.html to
create a
design time assembly of my control. I then added the Design.MyControl to my
toolbox and tried to drop my control on the Smart Device Form and nothing
happended except that the following was displayed in the Task List
* The dependency 'System.Runtime.Serialization.Formatters.Soap' could
not be found.
* The dependency 'Accessibility' could not be found.
My controls is derived from the System.Windows.Forms.Panel klass and simply
override the OnPain method and draws a border like so
namespace ControlTest
{
public class MyControl : System.Windows.Forms.Control
{
public MyControl() : base()
{
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint (e);
Rectangle controlRectangle =
new Rectangle(0, 0, this.Width-1, this.Height-1);
e.Graphics.DrawRectangle(new Pen(Color.Black),
controlRectangle);
}
}
The last thing I did was to add the following to the AssemblyInfo file
#if NETCFDESIGNTIME
[assembly:
System.CF.Design.RuntimeAssemblyAttribute("ControlTest.MyControl,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")]
#endif
The MyControl.dll when into the \WindowsCE\ folder and the
Design.MyControl.dll
went into the \WindowsCE\Designer\ folder. This has been eating at me since
last
night and I need a hint or two =)
//Andreas Håkansson
create a
design time assembly of my control. I then added the Design.MyControl to my
toolbox and tried to drop my control on the Smart Device Form and nothing
happended except that the following was displayed in the Task List
* The dependency 'System.Runtime.Serialization.Formatters.Soap' could
not be found.
* The dependency 'Accessibility' could not be found.
My controls is derived from the System.Windows.Forms.Panel klass and simply
override the OnPain method and draws a border like so
namespace ControlTest
{
public class MyControl : System.Windows.Forms.Control
{
public MyControl() : base()
{
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint (e);
Rectangle controlRectangle =
new Rectangle(0, 0, this.Width-1, this.Height-1);
e.Graphics.DrawRectangle(new Pen(Color.Black),
controlRectangle);
}
}
The last thing I did was to add the following to the AssemblyInfo file
#if NETCFDESIGNTIME
[assembly:
System.CF.Design.RuntimeAssemblyAttribute("ControlTest.MyControl,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")]
#endif
The MyControl.dll when into the \WindowsCE\ folder and the
Design.MyControl.dll
went into the \WindowsCE\Designer\ folder. This has been eating at me since
last
night and I need a hint or two =)
//Andreas Håkansson