J
John Dinning
I have created a simple visual component based on a Label, with no
properties or methods added so far (using VS2005, New Control Library
project for smart device Windows CE 5).
It builds ok, I can add it to the toolbox and use it no problem in my test
project..
However, it will also required to call an existing DLL.
When I just add the two lines:
[DllImport("MyTest.dll")]
private static extern int TestFunc();
It builds ok, but the component is somehow corrupted.
The text on the label in the designer in the test project displays
"KBDStatusLabelLib.KBDStatusLabel" not "KBDStatusLabel1" as expected.
Also, if I add a property the designer displays the the Error "The type
'Microsoft.CompactFramework.Design.UnsafeControl' has no property
named 'MyProperty'"
The code for the label component is here:
namespace KBDStatusLabelLib
{
public partial class KBDStatusLabel : Label
{
public KBDStatusLabel()
{
InitializeComponent();
}
[DllImport("MyTest.dll")]
private static extern int TestFunc();
}
}
Can anyone help please?
John.
properties or methods added so far (using VS2005, New Control Library
project for smart device Windows CE 5).
It builds ok, I can add it to the toolbox and use it no problem in my test
project..
However, it will also required to call an existing DLL.
When I just add the two lines:
[DllImport("MyTest.dll")]
private static extern int TestFunc();
It builds ok, but the component is somehow corrupted.
The text on the label in the designer in the test project displays
"KBDStatusLabelLib.KBDStatusLabel" not "KBDStatusLabel1" as expected.
Also, if I add a property the designer displays the the Error "The type
'Microsoft.CompactFramework.Design.UnsafeControl' has no property
named 'MyProperty'"
The code for the label component is here:
namespace KBDStatusLabelLib
{
public partial class KBDStatusLabel : Label
{
public KBDStatusLabel()
{
InitializeComponent();
}
[DllImport("MyTest.dll")]
private static extern int TestFunc();
}
}
Can anyone help please?
John.