Previous | Index | Next 

[PRB] The DataBindings property of a bound user control isn’t migrated

The current version of VB Migration Partner doesn’t migrate the DataBindings property of a user control defined in the same or different project. The only viable workaround is assigning the DataBindings property in the Form_Load event handler. The following VB6 code sample shows how you can achieve this effect without affecting the behavior of the original application:

    Private Sub Form_Load()

        #If VBC_VER = 8 Then
        With Me.Customer1.DataBindings
            .Add(Customer1, "CustomerName", "CompanyName")
            .Add(Customer1, "Address", "Address")
            .Add(Customer1, "City", "City")
            .Add(Customer1, "ZipCode", "PostalCode")
            .Add(Customer1, "Country", "Country")
            .Add(Customer1, "Phone", "Phone")
            .Add(Customer1, "Fax", "Fax")
        End With
        #End If

    End Sub


Previous | Index | Next