RE: winform designer (2005) error: duplicate component name

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi Rip,

When a form is opened in the designer, an instance of the base form, if
any, is created first(thus, the base form's default constructor is called).
Next the base form's Load event handler is called, if any. At last the
inherited form's InitializeComponent method is called.

I get the error message "Duplicate component name
'iDDataGridViewTextBoxColumn'. Component names must be unique and
case-insensitive."

The 'iDDataGridViewTextBoxColumn' seems to be the name of a
DataGridViewColumn. It seems that you're trying to add two
DataGridViewColumns with the same name into the DataGridView.

I suggest that you check the above 3 paragraphes of code, i.e. base form's
constructor and Load event handler and the inherited form's
InitializeComponent method to find out the lines of code that cause the
problem.

To check a paragraph of code, you may comment out all the lines of
statements first and build the project if the code is in the base form.
Open the form in the designer to see if it can be opened properly. If yes,
uncomment some of the lines of statements and build the project, if
necessary, and then reopen the form to see if it can be opened correctly.

Repeat the above steps, until you find the lines of code that cause the
problem. Then you could correct the lines of code to solve the problem.

Alternatively, you could debug code at design time. There's a walkthrough
in MSDN for this topic. You may visit the following link for the detail
information.

"Walkthrough: Debugging Custom Windows Forms Controls at Design Time"
http://msdn2.microsoft.com/en-us/library/5ytx0z24(vs.80).aspx

Hope this helps.

If you have anything unclear, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages

  • RE: Designer doesnt update the window/form region based on subclassing
    ... When I open Form2 in the designer, I see a circular form in the designer. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: 2005 vs. 2003
    ... VS05 introduces the definition of Partial class, and places the Windows ... Forms Designer generated code in a seperate file, ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.languages.vb)
  • RE: Form design view with Fatal Execution Engine Error (7A2B45A2) (0)
    ... When a form is opened in the form designer, ... InitializeComponent method will be executed. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework)
  • RE: Serialization and parameterized constructor
    ... parameterized constructor on your web service but there will be no way to ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework)
  • RE: Showing the private key stored in a pfx file
    ... parameters) and default constructor pass the actual work to the following ... To display the private key of PFX file, .Net2.0 has the build-in support. ... where an initial response from the community or a Microsoft Support ... project analysis and dump analysis issues. ...
    (microsoft.public.dotnet.framework)