TIP: Click on subject to list as thread! ANSI
echo: visual_basic
to: All
from: Mickey mickeyatgruizelgr
date: 2005-02-20 09:27:00
subject: Re: Printer help

On Sun, 20 Feb 2005 04:19:59 GMT, al jones 
you typed some letters in random order:

>On Sat, 19 Feb 2005 21:51:33 -0500, Hal Rosser wrote:
>
>> "al jones"  wrote in message
>> news:4pw3hxjxmf8p.179oylccy8n0w$.dlg{at}40tude.net...
>>> okay, doing some printing out of VB6.  I've found printer and can change
>>> fonts and type size, now I need to set the margins for my
printed page and
>>> don't see printdoc in msdn - what should I be looking for??
>>>
>>> Also, how do I check to see if the current location on the page + the
>> next,
>>> for exmaple) 6 lines of text would overflow the page??
>>>
>>> TIA //al
>>
>> Look at the Printer object
>> some sample lines::::::::
>> Printer.FontSize = 12
>> Printer.CurrentX = 20
>> Printer.CurrentY = 50
>> Printer.Print "Hello World"
>> Printer.EndDoc
>
>Hal, since you're awake and responding.  I've gotten parts to work,  I'm
>printing to a pdf since I can't get to the real printer from inside this
>virtual system (for some reason).  The MSDN (VB6 June 2000) I have, has no
>examples - and I'm back to not being able to see how to put the pieces
>together.  BTW in VB6 it's Printer.Font.Name and Printer.Font.Size.  I
>can't find (don't know what to look for) to set the margins on the print
>doc in VB6

Are printer margins not dictated by the printer, it depends on brand
and type,I think.

If you do a:
Printer.CurrentX = 0
Printer.CurrentY = 0
Printer.Print "Hello World"
It should print on the top left including printer margins.

I use this to print a line raster page with x and y coords

Private Sub Command1_Click()
Dim X As Long
Dim Y As Long
Printer.FontSize = 8
For X = 0 To 11000 Step 1000
    Printer.CurrentY = 0
    Printer.CurrentX = X
    Printer.Print "x=" & X
    Printer.Line (X, 0)-(X, 16000)
Next

For Y = 0 To 16000 Step 1000
    Printer.CurrentX = 0
    Printer.CurrentY = Y
    Printer.Print "y=" & Y
    Printer.Line (0, Y)-(11000, Y)
Next

Printer.EndDoc

End Sub




>, nor how to calculate how much space I have left at the end of
>the page.

The space left on the bottom of the page depends on the fontsize.
You could try and count the lines you have printed. And calculate th e
remaining space.

>I've looked at the gdi docs for vb.net but that's not helpful (to me) as I
>can't see the relationship - even though it appears as if VB6 is using a
>similar technique.
>
>Suggestions???

Groetjenz,

Mickey
--
#### gewoan skrieve su ast ut seist ####


--- UseNet To RIME Gateway {at} 2/20/05 9:24:52 AM ---
* Origin: MoonDog BBS, Brooklyn,NY, 718 692-2498, 1:278/230 (1:278/230)
SEEN-BY: 633/267 270 5030/786
@PATH: 278/230 10/345 106/1 2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.