• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 162
  • Last Modified:

Windows form designer code error ?

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 ?

0
pillmill
Asked:
pillmill
  • 2
  • 2
1 Solution
 
jpaulinoCommented:
Me.AcceptButton = Me.CommandOK is Ok.

Do you really have CommandOK created?

Are building an normal windows form ?
0
 
pillmillAuthor Commented:
There is no CommandOK.

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

Thanks
0
 
jpaulinoCommented:
You can ...
0
 
pillmillAuthor Commented:
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.

0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

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