Reputation: 106
Had a problem using custom user controls in VB.Net after migrating a project from VB6. Just wanted to save someone some time by posting my solution since I did not see anything similar after searching.
Upvotes: 0
Views: 229
Reputation: 106
The issue was if the User Control in VB6 used the UserControl_InitProperties() method, it does not get called automatically in VB.Net, therefore you need to call this method here:
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
UserControl_Initialize()
UserControl_InitProperties()
End Sub
Upvotes: 1