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

kb_qiw 20 Reputation points
2023-05-22T17:29:03.4066667+00:00

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()

Differences:

  • 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,

Ken

Developer technologies VB
{count} votes

Accepted answer
  1. Jiachen Li-MSFT 34,221 Reputation points Microsoft External Staff
    2023-05-23T05:22:45.1333333+00:00

    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 122.5K Reputation points
    2023-05-23T05:28:47.8766667+00:00

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.