I am getting the below error while migrating from VB6 to VB.Net:
Error 1 'PrintForm1' is not a member of 'System.Windows.Forms.Form'. in the below code:
Public Sub PrintScreen(ByRef frm As System.Windows.Forms.Form, ByRef FormHeight As Short)
'UPGRADE_ISSUE: PrintForm Component might require to be declared. frm.PrintForm1.Print(frm, PowerPacks.Printing.PrintForm.PrintOption.CompatibleModeClientAreaOnly)
End Sub The error is related to the 'System.Windows.Forms.Form' not containing the 'PrintForm1' as its member. In the project, I am sending different forms, with PrintForm Component, to a particular form using the above subroutine. According to the upgrade msg we have to declare the PrintForm1 Component in the subroutine. How can we change this code to get the desired effects?