Strange behaviour when printing outside db. 
Author Message
 Strange behaviour when printing outside db.

Hello.
I have VB.6.
I am user printer object to print.
When I am printing from VB. 6 (from the IDE), the printed report is fine,
but when outside (same exe, same printer), printing is not ok (it seems out
of range, because I am using currentX and currentY attributes.

I there any know problem about, or should I reset printer before printing ?

Thanks :)



Tue, 14 Dec 2010 16:09:19 GMT  
 Strange behaviour when printing outside db.
Here is some of my relevant code :
------------------------------------
SaveY as integer
SaveY = Printer.CurrentY
Printer.Orientation = vbPRORPortrait
Printer.RightToLeft = True
Printer.FontName = "Miriam Fixed"

Printer.ScaleMode = vbCharacters
printer.CurrentY = SaveY
Printer.CurrentX = 0
Printer.Print "column 1"

printer.CurrentY = SaveY
Printer.CurrentX = 24
Printer.Print "column 2"
...

Printer.EndDoc

I don't know why - when printing from VB.6. printing is OK,
otherwise I cannot see what I am printing (10 pages instead of 3)
Thanks :)



Tue, 14 Dec 2010 17:02:15 GMT  
 Strange behaviour when printing outside db.
The major problem, is that every column is printed on seperated page (only
outside VB), and not at the same one.
Why ?

Thanks :)



Mon, 13 Dec 2010 17:21:03 GMT  
 Strange behaviour when printing outside db.

released on Fri, 27 Jun 2008 01:09:19 -0700 bearing the
following fruit:

Quote:
>Hello.
>I have VB.6.
>I am user printer object to print.
>When I am printing from VB. 6 (from the IDE), the printed report is fine,
>but when outside (same exe, same printer), printing is not ok (it seems out
>of range, because I am using currentX and currentY attributes.

>I there any know problem about, or should I reset printer before printing ?

>Thanks :)

Are you running the executable on the same PC as the IDE?
--
Jan Hyde

https://mvp.support.microsoft.com/profile/Jan.Hyde



Mon, 13 Dec 2010 21:28:12 GMT  
 Strange behaviour when printing outside db.

released on Fri, 27 Jun 2008 01:09:19 -0700 bearing the
following fruit:

Quote:
>Hello.
>I have VB.6.
>I am user printer object to print.
>When I am printing from VB. 6 (from the IDE), the printed report is fine,
>but when outside (same exe, same printer), printing is not ok (it seems out
>of range, because I am using currentX and currentY attributes.

>I there any know problem about, or should I reset printer before printing ?

>Thanks :)

This may or may not be relevant but...

http://support.microsoft.com/kb/173074
--
Jan Hyde

https://mvp.support.microsoft.com/profile/Jan.Hyde



Mon, 13 Dec 2010 21:30:10 GMT  
 Strange behaviour when printing outside db.

Quote:
> Here is some of my relevant code :
> SaveY as integer
> SaveY = Printer.CurrentY
> Printer.Orientation = vbPRORPortrait
> Printer.FontName = "Miriam Fixed"
> Printer.ScaleMode = vbCharacters
> [snip]
> printer.CurrentY = SaveY

That's "air code". It's never seen the inside of the VB6 IDE. You need to
post your actual code, by copying it from your VB project and pasting it
into your newsgroup message, so that we know that the code you are posting
is exactly the same as the code you are actually using. Also you have not
shown us some important parts of your code where you are setting up the
printer, so we don't know exactly what you are doing. For example, where are
you setting the size of the font?

Regarding that Printer.RightToLeft setting, are you using a system on which
that actually works? If you follow that line with MsgBox Printer.RightToLeft
then what do you see in the message box?

Also, do you realise that using Printer.ScaleMode = vbCharacters does NOT
set the scale units to the actual size of the characters. It in fact sets
the scale units so that each unit is 6 points in the horizontal direction
and 12 points in the vertical direction, regardless of the name of the font
or the point size of the font you are using. So, unless you understand
exactly what a ScaleMode of vbCharacters does then it might be wise to avoid
using it. Personally I would suggest that you use a ScaleMode of vbInches or
vbCentimeters or whatever normal real world measuring units you are most
comfortable with. Then the scale units will be the same size in both the
vertical and the horizontal direction and also you will easily be able to
visualise exactly where things will end up on the page.

Post more of your code, and make sure it is your actual code taken directly
from your VB IDE.

Mike



Tue, 14 Dec 2010 01:44:20 GMT  
 Strange behaviour when printing outside db.
Fix your system clock and/or time zone. You have future-posted.


Tue, 14 Dec 2010 10:58:52 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. MSChart behaviour plotting values outside plotted range

2. strange behaviour of a subform, or a bug?

3. Strange Access behaviour or Bug, or what ?!?

4. Strange Behaviour

5. Strange behaviour of toolbars

6. XP users - Strange date behaviour

7. Strange behaviour in Word

8. DT Picker Control on Multi Page - Strange Behaviour

9. Public folders strange behaviour ?

10. strange text file behaviour

11. Strange debugging behaviour

12. decimal point - strange behaviour macro Word 97 and previous vers ion

 

 
Powered by phpBB® Forum Software