![]() |
.Net printing
Does anybody know any good .net printing tutorials? This seems to be a little touched area. Thanks and I will dance at your wedding.
Before you post anything from msdn, I'm already looking at this and trying to understand it. |
Re: .Net printing
not sure how much detail you want in your prints. I found this here link on about.com, it shows how to get basic text printing. However that example doesn't provide wrapping, if you print a line that is too long it will be cut off on the right side of the page.
This link seems to be a little more indepth and even shows you how to create a print preview. Hope that helps a little. I am not a VB.NET coder by any means but i do have some understanding of the language. |
Re: .Net printing
There's loads of stuff on Visual Basic 6 for printing but not that much in VB.NET. You have to write quite a few lines of code - I'm not sure exactly how to do it. It's easy to print to a file but not so easy to get it out on paper.
Sorry I couldn't be more help, Matt. I |
Re: .Net printing
Yeah, VB6 printing was fairly easy, VB.Net is a bit more involved, but what I'm reading sounds to be more standardized and functional.
Right now, I'm just printing (hopefully) a single page. |
Re: .Net printing
if you take a look at those links, they show you how to do it in VB.NET.
|
Re: .Net printing
will do...just let me know when you're getting married lol
|
Re: .Net printing
If you do manage please could you upload a piece of example code so that people looking back over this thread in the future (i.e. me) might have an idea of how to do it without following external links?
|
Re: .Net printing
|
Re: .Net printing
.NET makes it very easy. I realise this is C# in a VB forum but obviously the principal is the same and VB Syntax just makes my teeth jangle a bit like fingernails on a blackboard, sorry.
:
using System; |
Re: .Net printing
Sorry for the delay, but here is how I did it.
:
:
errstring is a string I built earlier in the code and is what is being printed. This is a simplified print with nearly non-existent formatting. The string provides the only formatting there is. There is no check for line length; I guestimated that the way I set everything up there would be no need. I would have to go into a bit more depth if I actually needed to format anything, such as adding a printdocument to the application that would handle all formatting for me according to settings. |
| All times are GMT -5. The time now is 12:46 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC