Author Topic: Modbus TCP causing an error on main form.  (Read 1295 times)

rob1970

  • Newbie
  • *
  • Posts: 18
    • View Profile
Modbus TCP causing an error on main form.
« on: March 13, 2020, 02:50:58 AM »
I am using the latest 399 release and Visual Studio 19. I open the form and build the project. Then size the form and choose the background. I then delete everything off of the form. I then go to the tools and drag the ModbusTCPCom to the form. I then click the ModbusTCPCom at the bottom of the form and set and IP address. I then Save All. I exit out of Visual Studio and try to reload the file and I get an Error screen that says:

The designer cannot process the code at line 28: Me.ModbusTCPCom1 = New AdvancedHMIDrivers.ModbusTCPCom(Me.components) The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again.

I then click to it and it brings me here.


  Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container()
        Me.Label1 = New System.Windows.Forms.Label()
        Me.ForceItemsIntoToolBox1 = New MfgControl.AdvancedHMI.Drivers.ForceItemsIntoToolbox()
        Me.ModbusTCPCom1 = New AdvancedHMIDrivers.ModbusTCPCom(Me.components)                           <this is line 28
        CType(Me.ModbusTCPCom1, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()


rob1970

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Modbus TCP causing an error on main form.
« Reply #1 on: March 13, 2020, 02:58:23 AM »
I just saw the post about the bug in VS 19. That seems to be the issue. Just an FYI. You can get by this bug by deleting a Character from the line and then pressing undo. You can then click on the form design tab and go right in. I started closing the forms before exiting and it seems to work.