StrandElectric explained :
> "Tom Shelton" <(E-Mail Removed)> wrote in message
> news:ihj13j$jaa$(E-Mail Removed)...
>> StrandElectric explained :
>>> Hi all
>>>
>>> No-one has yet got back to me indicating how in vb.net I can address the
>>> printer properly and print nicely formatted columns of information as I
>>> could with vb6. Having made considerable headway with vb.net, and being
>>> persuaded that it is a very flexible system with many options, I am sure
>>> it must be possible (but possibly undocumented?). I do not want to print
>>> a copy of the form on the screen. I want to print variables by name in the
>>> horizontal position that I choose, preferably simply.
>>>
>>> Like this pseudo code:
>>>
>>>
>>> With Print to Printer
>>> at tab1, MyVariableName
>>> at tab20, MyVariableNet
>>> at tab30, MyVariableGST
>>> at tab40, MyVariableTotal
>>> Linecount = Linecount +1
>>> End With
>>>
>>> If linecount >50 then
>>> Lincount =0
>>> NextPage
>>> End If
>>>
>>> (I've posted actual vb6 code earlier)
>>>
>>> Also, it would be nice to access the printer dialogue box to check which
>>> of my printers I wish to use (failing that I'd go for the default
>>> printer). I definitely want to be able to code portrait or landscape
>>> according to the (financial report) I want to print, like this psedo code
>>> at the start of each report.
>>>
>>> Like this pseudo code
>>>
>>> Choose Printer.Orientation = Portrait
>>>
>>> Any takers? Needing less than 10,000 lines of code please (only kidding
>>> this last bit...)
>>
>> I thought the vb power pack had some sort of printer thing similar to VB6?
>> Not sure though.
>>
>> This may sound funny, but, I've never really done much printing in either
>> vb.net or even vb.classic
So, I can't really advise you on this much.
>>
>> Did find this article that SEEMS, though I haven't really tried it, to
>> cover printing in VB.NET:
>>
>> http://www.dreamincode.net/forums/to...ting-in-vbnet/
>>
>> At least the basics 
>>
>> -- Tom Shelton
>>
> Well Tom, I strugggled with that reference. I understood the Imports commands
> but very little else, and certainly not the code that began with #Region and
> used the three single quotes '''. Are those valid starts to a line?
> Altogether far too long and also abstract.
>
The three ' are xml comments. They are used to generate documentation
from the code comments.
The #Region stuff is so that you can have collapsable sections in your
code. The don't do anything with your code.
As for, using the stuff in the powerpack, it should be install it, add
the reference, use the import statement and write code.
> It is difficult to imagine anyone in the real world neglecting printing in a
> so-called serious tool that will be used in eg financial packages...
Why do you say that? I've done lots of serious applications, but
printing was never a requirement. Even when I have done stuff that
needed to generate documents, I either generated PDF or XPS documents
and let the user print them from the viewer - no need for me to write
any printing code.
> And
> putting it in the 'next framework' is no answer because that means any
> application using it won't work in previous frameworks and can't be presented
> as a universal exe file that anyone can use.
>
I don't know what you mean by that? Printing is in the .NET framework.
Has been all along... I just haven't had a reason to use it that
much.
--
Tom Shelton