Converting FpSpreadPreview (SpreadPro 3) to Spread for Windows

Posted by: elwinharrison on 8 September 2017, 1:49 pm EST

  • Posted 8 September 2017, 1:49 pm EST

    <P>I am converting an older VB6 application which used Spread Preview component of SpreadPro3. How can I replace the Spread Preview when using Spread for Windows?</P>
    <P> </P>
    <P>Thanks </P>
  • Replied 8 September 2017, 1:49 pm EST

    <p>Hello, </p><p>In case you are using Spread for Windows (.net) and would like use the Preview feature as is available in the Spread(COM) version, then with Spread Window(.net) you may try using the OwnerPrintDraw method of the FpSpread class to provide a print preview dialog with some options for previewing the pages before printing.A sample illustrating this method is installed with the product samples. The path for the sample, if you performed a default installation, is C:\Program Files\FarPoint Technologies\Spread.WinForms\v4.x.x\Samples\Examples\OwnerPrint. When you run the sample code, you can select Print Preview from the File pull-down menu on the form. This launches the print preview dialog. I am also attaching the same with this.</p><p>Thanks</p>
  • Replied 8 September 2017, 1:49 pm EST

    <P>In addition to what Suresh stated, we also have a built in PrintPreview dialog that you can show by setting the Preview property of the PrintInfo structure to True before calling the PrintSheet method.</P>
  • Replied 8 September 2017, 1:49 pm EST

    <P>I guess that I need to provide more of an explanation around my problem.</P>
    <P> The application that I am converting used SpreadPro 3 and one screen has the spreadpreview component as a control on the screen.</P>
    <P> What I need to do is to replicate that functionality using Spread for Windows 3.0.</P>
    <P>Is there anyway to do that? I saw something about a Spreadview constructor in the documentation but not sure how to use it in my current application</P>
    <P>Thanks for any help you can provide.</P>
  • Replied 8 September 2017, 1:49 pm EST

    <p>Hello, </p><p>Like Spread(COM), we do not have a seperate PrintPreview control in .net version of Spread control.Instead we use the built in PrintPreview dialog for previewing the contents of the Spread control.As informed earliwe in .net Spread control, we make use of the OwnerPrint.This can be accessed as follows:</p><blockquote><p>FpSpread1.ActiveSheet.PrintInfo.Preview = True<br>FpSpread1.PrintSheet(0) <br></p></blockquote><p>Thanks</p><p><b>Edit</b>: Please note above snippet will invoke the built in preview dialog.</p>
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels