Error during Generation of [Form].Developer.vb code in BeginInit / EndInit rows for DataGridView and NumericUpDown Controls

kb_qiw 20 Reputation points

Hello, Sorry if this is a noob question...

Other VB.NET Forms with DataGridView and NumericUpDown controls in this Project work fine. The generated lines in '.Developer.vb' looks like:

CType(dgvwStructLibrary, ComponentModel.ISupportInitialize).BeginInit()
CType(numspnStructLaborCode, ComponentModel.ISupportInitialize).BeginInit()

Form that error occurs looks like:

(CType(Me.dgvwStructLibrary, Global.System.ComponentModel.ISupportInitialize)).BeginInit()
(CType(Me.numspnStructLaborCode, Global.System.ComponentModel.ISupportInitialize)).BeginInit()


  • CType( --> (CType(Me.
  • ComponentModel.ISupportInitialize). --> Global.System.ComponentModel.ISupportInitialize)).

Manually updating (.Developer.vb file) removes error from Error List:

  • (CType( --> CType(
  • .ISupportInitialize)). --> .ISupportInitialize).

But Error will return with:

  • Almost any modification in visual GUI Designer.
  • Every few changes in Form Code. After correcting and Rebuilding, Form does behave correctly for a few minutes... then the error comes back.

Thank you,


An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,655 questions
{count} votes

Accepted answer
  1. Jiachen Li-MSFT 28,781 Reputation points Microsoft Vendor

    Hi @kb_qiw ,

    When you make a modification in the designer view, it produces new code that overwrites the original code in the designer .vb.

    If other forms don't have this problem, maybe you can try recreating this form to see if the same problem persists.

    Or try updating your Visual Studio to the latest version.

    Best Regards.

    Jiachen Li

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Viorel 114.4K Reputation points