Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using the following code to print a scroll able windows form. but got the error or Me and Powerpacks........

printForm1.Print(Me, PowerPacks.Printing.PrintForm.PrintOption.Scrollable);

any help in this regard will be highly appreciated.
Posted
Comments
Wendelius 13-Aug-11 3:24am    
What was the error?

1 solution

Assuming this is indeed C# as you tag says, then that would explain both: Me only exists in VB - for C# it is this.

Similarly, the VB Powerpacks are not installed by default to C# applications. Add the "microsoft.VisualBasic" assemblies to your references, and you should get them.

However, I would strongly suggest that the PrintForm component is not the way to go: use a (Non-power pack) PrintDocument[^] instead. It is a little more complex to use, but it is a lot more flexible and will give a much, much better printed output.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 13-Aug-11 21:28pm    
Good catch; agree with your advice, my 5.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900