Upgrading VB6 to VB.net printing problem
-
First post here so please be patient, I wrote some software for the company that I work for in VB6 for Scheduling and quoting construction based projects and am upgrading to VB 2008, not a problem except for the printing, The user had several check boxes and option groups which related to which pages were printed, each unrelated, the first was a cover page, second page a preamble, third page list of doors etc all taken from different sources, in VB6 it was pretty simple to create a printer object (called myPrint) call the various page sub routines and to put it together example as below: Select Case True Case frmPrint.optAll(0).Value = True 'materials listing MyPrint.NewPage PProductListingA Case frmPrint.optAll(1).Value = True 'bill of quantities MyPrint.NewPage PBOQsA Obviously we've lost the NewPage which has been replaced with HasMorePages from with the PrintPage method, I've spent about a week now trying to call the various sub routines from within this and quite simply have hit a brick wall. Lots of examples on the web to point me in the right direction but they all seem to be based around a single block of text printed over various pages, help.
-
First post here so please be patient, I wrote some software for the company that I work for in VB6 for Scheduling and quoting construction based projects and am upgrading to VB 2008, not a problem except for the printing, The user had several check boxes and option groups which related to which pages were printed, each unrelated, the first was a cover page, second page a preamble, third page list of doors etc all taken from different sources, in VB6 it was pretty simple to create a printer object (called myPrint) call the various page sub routines and to put it together example as below: Select Case True Case frmPrint.optAll(0).Value = True 'materials listing MyPrint.NewPage PProductListingA Case frmPrint.optAll(1).Value = True 'bill of quantities MyPrint.NewPage PBOQsA Obviously we've lost the NewPage which has been replaced with HasMorePages from with the PrintPage method, I've spent about a week now trying to call the various sub routines from within this and quite simply have hit a brick wall. Lots of examples on the web to point me in the right direction but they all seem to be based around a single block of text printed over various pages, help.
I cannot help you exactly on your problem, but Microsoft has an excellent article on printing in .NET: http://msdn.microsoft.com/en-us/magazine/cc188767.aspx[^] It helped me a lot to learn about printing in VB.NET. Note that there's some source-code relating to the article which also deals with multi-page texts. Maybe it's worth to have look. There is also a lot neat stuff in it, like status texts in status bars, print preview and so on.
-
I cannot help you exactly on your problem, but Microsoft has an excellent article on printing in .NET: http://msdn.microsoft.com/en-us/magazine/cc188767.aspx[^] It helped me a lot to learn about printing in VB.NET. Note that there's some source-code relating to the article which also deals with multi-page texts. Maybe it's worth to have look. There is also a lot neat stuff in it, like status texts in status bars, print preview and so on.