2.0 Custom controls and API

Hello,
i made a control library with some test controls. They work fine on my other project till i try to declare a function from "coredll" in one of my controls classes.
By placing any control on the form in designer, it morphs into a simple rectangle with full namespace name in the middle.
I tried also to import those function from user32.dll but it doesnt affect the strange behaviour. Everything goes fine by removing the declare or import statement.
Does API invoking not work when designing custom controls on CF 2.0?
Thanks.
[558 byte] By [johano] at [2008-2-10]
# 1
Add the DesignTimeAttributes.xmta file to your project and the following xml to it:

<?xml version="1.0" encoding="utf-16"?>

<Classes xmlns="http://schemas.microsoft.com/VisualStudio/2004/03/SmartDevices/XMTA.xsd">

<Class Name="YourControlFullName">

<DesktopCompatible>true</DesktopCompatible>

</Class>

</Classes>

AlexY at 2007-9-8 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...