473,395 Members | 1,666 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Designer Serialization Problem

Hi All,

I am developing a Dotnet component in C#, and it has got a set of design
time properties which can be changed using the Properties Window. The
problem I am facing here is, whenever you drag and drop this component from
the component palette, visual studio designer will add some lines of code in
the "InitializeComponent" procedure of the Main application, which is giving
errors while compiling.

The component has got a property named "FormMain" which is of type class
"Main". I have a number of classes derived from class "Main" and the
property "FormMain" can contain objects of any of the above mentioned
derived classes. Currently I am using "DesignerSerailizationVisiblity" &
"TypeConverter" attributes for the "FormMain" property.

The line added in "InitializeComponent" procedure is as given below:

Component1.FomMain.Cells =
((ClsCells)(resources.GetObject("resource.Cells")) ); --Error...

This should come like:

((DrvMainA)(Component1.FomMain)).Cells =
((ClsCells)(resources.GetObject("resource.Cells")) ); ------ DrvMainA is
derived class of Main.

Anybody knows how to solve this problem.
Thanks in advance,
Sujith Manuel.


Nov 15 '05 #1
0 921

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

Similar topics

11
by: Daniel Billingsley | last post by:
I've got a project I've been working on for a few weeks. I've been using the BindingSource control - I've got four of them on this particular form. This morning I went to view the report in the...
1
by: Lucien Dol | last post by:
Hi all, Can someone help me with this, please? I've got a user control that (amongst other controls) contains a textbox. The textbox has its Anchor property set to "Left, Top, Right", meaning...
0
by: Adam Right | last post by:
Hi, I am using contextmenustrip in my usercontrol in which there is a grid control associated with it. I added the rows below in the designer code, to create contextmenustrip with its...
0
by: Bruce HS | last post by:
In VS2005, VB 2005, I suddenly can't get at a winform design view. The application still runs OK, but I can't see the designer. I'ver rebuilt the solution with no success. I'm looking for a...
1
by: dusanv | last post by:
Hi, I have a class (say O1) that overrides System::Windows::Forms::UserControl and then another one that overrides O1 (call it O2). O2 used to work with the Designer as it was inheriting...
5
by: Alan T | last post by:
I got this kind of error recently: When I tried to open a form I got error something like this: One of more errors encountered while loading the designer. The errors are listed below. Some...
4
by: ThunderMusic | last post by:
Hi, I have a custom form that works fine when I debug it or run it in release mode but cannot be loaded in the designer... Actually, it can be loaded in the designer when no control is on it, but...
1
by: =?Utf-8?B?RjVGNUY1?= | last post by:
I have created a control by inheriting ToolStripMenuItem that has an image property called LargeImage. ------ public class EventSubMenuItem : ToolStripMenuItem { private Image _largeImage =...
6
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
Yesterday Visual Studio gave me a strange error both at compiletime and at designtime that had no obvious connection to anything I had changed recently. After some effort tracking down the problem...
3
by: steve | last post by:
VS designer has started to complain about the following errors : Object reference not set to an instance of an object. Instances of this error (2) and Index was out of range. Must be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.