Hello,
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?
Regards,
Simran Kaur.
Simran Kaur
0
Newbie Poster
Recommended Answers
Jump to PostYou need to download the Power Packs for Visual Basic and install them. Then you sould fint the printform component to add to your form.
http://msdn.microsoft.com/en-us/vbasic/bb735936.aspx
Hope this helps
Jump to PostPrintForm Component might require to be declared.
frm.PrintForm1.Print(frm, PowerPacks.Printing.PrintForm.PrintOption.CompatibleModeClientAreaOnly)
The form "frm" must have a control that shoud be called PrintForm1.
To add a such control in the form "frm" you can:
1) On the designer of the form add the PrintForm Control
2) On the Load event, or …
All 6 Replies
lolafuertes
145
Master Poster
Simran Kaur
0
Newbie Poster
lolafuertes
145
Master Poster
Simran Kaur
commented:
was helpful
+1
Simran Kaur
0
Newbie Poster
lolafuertes
145
Master Poster
Simran Kaur
commented:
was helpful
+1
Simran Kaur
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.