Windows form designer code error ?

Posted on 2007-07-23
Last Modified: 2013-11-26
The following code was added to my VB6 conversion.

It states: 'NOTE: The following procedure is required by the Windows Form Designer
      'It can be modified using the Windows Form Designer.
      'Do not modify it using the code editor.'

However, this code itself gives a build error in VB.NET 2005.
If I try and change the code, it refuses to process any edits to the code
that produces the error. The line in error is:

Me.AcceptButton = Me.CommandOK

The error is - the Me.AcceptButton not defined in the project.

How do I fix this ?

Question by:pillmill
    LVL 48

    Expert Comment

    Me.AcceptButton = Me.CommandOK is Ok.

    Do you really have CommandOK created?

    Are building an normal windows form ?

    Author Comment

    There is no CommandOK.

    Why can't I remove it from the autogenerated code ?

    LVL 48

    Accepted Solution

    You can ...

    Author Comment

    Thanks, I can without warning in .NET 2005.
    The upgrade converter seems to create button definitions
    from the click events and button properties in the VB6 code.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
    The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
    The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now