[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1019
  • Last Modified:

Problem with InitializeComponent for a form

Hi,

I'm using Visual Studio 2008 and making an application in VB.Net

I'm getting the following error on the attached jpeg when I try to build the project.

Thanks for any help. I can't even remember what I was doing that would have caused this problem.


problem-2009-02-21.jpg
0
davecocks
Asked:
davecocks
  • 4
  • 2
  • 2
2 Solutions
 
ChloesDadCommented:
Have you done any editing of control information outside of the form designer?

If you can, open the form in the form designer and change the forms name, even if you only change it and then change it back again. Then save the form. The error might go away, if it doesnt then just delete the line and then save the form. Then edit it again in the form designer

Hope this helps
0
 
davecocksAuthor Commented:
Hi,

Thanks for your suggestion. I've tried both ways and I still get the same error but with the new form names.

Is there a way to revert the whole project back to the previous build? Would that solve the problem?

Thanks again,

Dave
0
 
ChloesDadCommented:
What about the other warning,

have you created something else called "Name" that is causing the conflict?
0
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 
davecocksAuthor Commented:
I think your right! I've probably changed a column name to 'name' on the form. Very foolish.

However, I can't seem to open the form anymore to correct the problem.

Any advice?



error2.jpg
0
 
davecocksAuthor Commented:
If I say 'ignore' I just see a blank form.
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
I think ChloesDad is on the right track...DOUBLE CLICK on the SECOND error to take you to the source.

I added this property to a form and got your exact errors:
Public Class frmDiveSurveyList
 
    Public Property Name() As DataGridViewTextBoxColumn
        Get
            Return Nothing ' <-- Just to make warning go away
        End Get
        Set(ByVal value As DataGridViewTextBoxColumn)
 
        End Set
    End Property
 
End Class

Open in new window

CompilerWarning.jpg
0
 
davecocksAuthor Commented:
Hi Guys,

Thanks for your input. I've split the points with most to ChloesDad, hope thats ok Idle MInd. Thankyou for taking the time to confirm the problem.

If I go through the frmDiveSurveyList.Designer.vb and eliminate all references to that other 'name' I can get the form to work.

But to be honest.. I'm going to start a fresh and delete the form.

Lesson learned: Don't rename things 'name'!!!!!
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Hehe...glad you figured it out...and points don't matter.  =)
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 4
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now