ERROR in CF Designer

ERROR in CF Designer

Post by Sérgio Almeid » Sun, 12 May 2002 02:52:07



Greetings.
I've downloaded the sample code of WROX's .Net Comact Framework book and,
when I try to try it in VS .Net with SDE April 2002beta , the following
error ocurs:

"An error occurred while loading the document. Fix the error, and then try
loading the document again. The error message follows:

The designer could not be shown for this file because none of the classes
within it can be desighned. The designer inspected the following classes in
the file:
frm*Measure --- The base class 'System.Windows.Forms.Form' could not
be loaded. Ensure the assembly has been referenced or built if it is part of
the project.
 *Measure --- The base class 'System.Object' cannot be designed."

I don't know why this occurs, and when I open a new project, the designer is
there!
Can anyone help me?

Bye :)

 
 
 

ERROR in CF Designer

Post by Jim Wilso » Sun, 12 May 2002 22:30:49


I would argue that the error is in the Sample project you've downloaded not
the CF Designer.  Chances are that they built the example under an earlier
build of CF and have not updated it for the new version.  You should
probably follow up with Wrox.

Jim Wilson
JW Hedgehog, Inc.
http://www.veryComputer.com/


Quote:> Greetings.
> I've downloaded the sample code of WROX's .Net Comact Framework book and,
> when I try to try it in VS .Net with SDE April 2002beta , the following
> error ocurs:

> "An error occurred while loading the document. Fix the error, and then try
> loading the document again. The error message follows:

> The designer could not be shown for this file because none of the classes
> within it can be desighned. The designer inspected the following classes
in
> the file:
> frm*Measure --- The base class 'System.Windows.Forms.Form' could not
> be loaded. Ensure the assembly has been referenced or built if it is part
of
> the project.
>  *Measure --- The base class 'System.Object' cannot be designed."

> I don't know why this occurs, and when I open a new project, the designer
is
> there!
> Can anyone help me?

> Bye :)


 
 
 

ERROR in CF Designer

Post by Michael Wittenbur » Mon, 13 May 2002 18:31:32



> I would argue that the error is in the Sample project you've downloaded
not
> the CF Designer.  Chances are that they built the example under an earlier
> build of CF and have not updated it for the new version.  You should

I'm not so sure... On numerous occasions when opening a SDE project or
solution the forms are shown in the Solution Explorer as classes (with a VB
icon rather that the gray forms icon). I found it very frustrating as when
loading like this I couldn't open the form using the designer. All I could
do was open it using the code editor.

I now get around this by adding a new form to the project and then removing
it. This seems to change all other form icons, and consqeuently allows me to
open the form using the forms designer.

HTH,

Mike Wittenburg
Web: http://www.wittenburg.co.uk

 
 
 

ERROR in CF Designer

Post by Michael Wittenbur » Mon, 13 May 2002 18:51:26


Ok, that last post was before I had a look at the Wrox samples. So while
what I described there still happens, I think I know why you're getting
those errors. Jim is right, the problem is in Wrox's source.

First, the apps were created with references to other folders, i.e.
"..\SlnName\AppName". Seems that when packinging for download the forlder
names were changes to things like "Chapter02", "Chapter03" etc. So you have
to open the source in a text editor and fix that.

Next, some of the projects use the DataTimePicker control (eg is the
Adjuster project in chapter 3). This control will only ship with the SDE RC
so you have to modify the source to work without it, or create your own
DataTimePicker ;-)

Have fun!

Mike Wittenburg
Web: http://www.wittenburg.co.uk

 
 
 

1. Writing Custom designers / editors for CF / Access Controls.AddRange in Designer/Editor code not possible?

When I'm writing custom controls with Designer support I create two seperate
DLLs.
One for the CF target and one for the Visual Studio Designer.

In the designer DLL I have a reference to the System.CF.Windows.Forms.dll
which contains some of the full featured framework like "UserControl" etc.
As second there is a reference to System.Windows.Forms.dll which includes
all types, that are not defined in Sytem.CF.Windows.Forms.dll.
This second reference produces the following conflict.

warning CS1595: 'System.Windows.Forms.Control' is defined in multiple
places; using definition from 'c:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Windows.Forms.dll'

error CS0122:
'System.Windows.Forms.Control.ControlCollection.AddRange(System.Windows.Form
s.Control[])' is inaccessible due to its protection level

But why is the "Controls.AddRange" method not accessible? This prevents me
to use the already written + tested Controls Editor/Controls Designer code I
have already written for the standard framework. So no editor forms /
controls InitialComponent method compiles.

I understand that the System.CF.Windows.Forms.dll must be used instead of
the standard frameworks System.Windows.Forms.dll to switch the code
serializers and limit the accessible properties of the CF "Control"
derivates.
Is there any way to access the Control type of the second referenced DLL
which contains the AddRange method?
This should be an important topic because otherwise my custom
designers/custom editors are limited to the Compact Framework!

Ralf

2. Has anyone got fonts for Syriac?

3. Custom Form Designers / UserControl designers in Visual Studio for CF

4. sml scripts

5. CF and Windows Form Designer error

6. From record (LP) to CD, HOW ?

7. .NET Add-ins in Excel do not show up in Add-ins

8. Vertical Portal for Automation

9. component designer support for CF

10. CF App to CF App Messaging

11. mscorlib conflict (CF vs non-CF)

12. CF Beta 1 Error on IPAQ H3950

13. Web Service error from .NET CF