views:

12

answers:

1

Hey all,

I'm brand new to Compact Framework and I need to compile a small project for a Windows CE 6.0 device (on which I already installed CF 3.5).

I'm using Visual Studio 2005. When creating a new project like : "Other languages -> Visual Basic -> SmartDevice -> Windows CE 5.0", I can compile a simple form, put it on my mobile device and launch it.

My problems start where I want to compile another project, I get the following error message :

Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter

Error 6 'MiddleCenter' is not a member of 'System.Drawing.ContentAlignment'.

It looks like I'm incomplete/too old reference for System.Drawing or something like that, but don't know what to do...

I'm using the following dlls -> Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\System.Drawing.dll

Is it possible to find an older compact framework ?

Thanks in advance for your help !

Andy

+1  A: 

You're trying to compile code for the full framework. The MiddleCenter property is not supported in .Net CF. See:

http://msdn.microsoft.com/en-us/library/system.drawing.contentalignment(v=VS.80).aspx

MusiGenesis
Mmmm I see... You're right, the code has been "ported" on xp... And indead some new lines are not supported by this framework... Thanks a lot for your answer !
Andy M
FYI: this property may be supported in .NetCF 4 (or 3.5 SP1), but I'm not sure. I'm an iPhone programmer now, dammit! :)
MusiGenesis
It's not supported by the OS, so the CF still doesn't support it. And there is no CF 4. We're still t 3.5 unless you're on WinPhone, but there you're not using WinForms so the question doesn't apply.
ctacke
@ctacke: like I said, I'm an iPhone programmer now. :)
MusiGenesis