472,780 Members | 2,042 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,780 software developers and data experts.

Design Mode Exception, Any ideas?

Hi,

I am using Visual C#.NET (2003 Env., Framework 1.1)

I wrote a custom control which seems to work just fine except that if I try
to add it to another form I get the following exception:

An exception occurred while trying to create an instance of
SPMInterface.CoarseApproachStepCalibrationCtl. The exception was "The type
serialized in the .resources file was not the same type that the .resources
file said it contained. Expected "SIUnitsLibrary.SIValue" but read
"SIUnitsLibrary.SIValue".".

SPMInterface.CoarseApproachStepCalibrationCtl is the control that it can't
add. SIUnitsLibrary.SIValue is a class that is used both in that control and
in the form I am trying to add the control to.

If I manually add the control to the form (in the code) and then run the
application, the control shows up and works just fine. But as soon as I go
back into design mode and try to view the form in the designer it gives me
this exception and (VERY ANNOYINGLY!) rips out the code that I wrote in to
load the control.

Any ideas what might be wrong? I've had the designer rip out custom
controls before, for example, if they try to reference something which isn't
initialized at design time and hence throws an exception. This is not the
case here, and I have no idea what this exception means or how to fix it.

Thanks,
Eric

Nov 16 '05 #1
0 1107

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Yasutaka Ito | last post by:
Hi folks! I have a BaseForm class that inherits System.Windows.Forms.Form. It has a property, whose value I need supplied by the class that inherits it. The BaseForm usees the value supplied...
3
by: Eric Hudson | last post by:
A quick rant and a question. Why does the designer in VS2003 delete code about custom components that it can't load? I've had large sections of forms disappear in the blink of an eye just...
1
by: Lance | last post by:
I get an exception when attempting to open a form in design mode if the form inherits from a form that is declared as MustInherit. For example, if I have: Public MustInherit Class TestFormBase...
2
by: Yasutaka Ito | last post by:
Hi folks! I have a BaseForm class that inherits System.Windows.Forms.Form. It has a property, whose value I need supplied by the class that inherits it. The BaseForm usees the value supplied...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.