VB6 allows late bound calls to procedures, but VB.NET gives an error. Does anyone have a solution for this?


Dim currentForm As Form = Form.ActiveForm

'The following statement gives an error; 'InitializeFields' is not a member of 'System.Windows.Forms.Form'

currentForm.InitializeFields()


Public Class Form1
Public Sub InitializeFields
txtText1.Text = ""
End Sub
End Class

Public Class Form2
Public Sub InitializeFields
txtText1.Text = ""
End Sub
End Class