Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing upside down using PrintForm!!!

Status
Not open for further replies.

Challenger10

Technical User
Jul 25, 2006
17
CA
I wrote a small program in VB5 that prints a label with a model #, date code and indexing number and was able to solve all the bugs except one. I'm new at VB and I can't seem to fix this one. I print the label using PrintForm and on my inkjet it prints fine but on the labeler its upside down. I need to rotate it 180°.
Can someone help me please.
Thanks
 
So, no real answers yet .. time for wacky work-arounds ...

there are a bunch of gag programs that flip your display upside down ( under 'funny downloads' )
if you run one of these, so your display is upside down, then print form - will that work ??
 
It's almost certain to be a setting in the label printer. A DIP switch or software configuration.

[gray]Experience is something you don't get until just after you need it.[/gray]
 
Thanks for the fast reply.
Unfortunately my company server has a restriction on that site. I've emailed our IT Support to release it.
For now if you can pass on some of the codes that does the rotation that would be great. As far as the printer I have the book and there is nothing in there. Now I changed the setting to protrait in the printer driver and the printing rotated 90° and then I tried to use the Printer.Orientation = 1 and 2 (I tried both) to change it by another 90°, but the orientation did not change anything.
 
it seems that particular example flips the screen, but any mouse click or keyboard input immediately flips it right back - so not very likely it will help you. I know there are other examples that will remain in that state for program execution.

I THINK if you have an INTEL EXTREME GRAPHICS driver, like my DELL, push ctrl-alt-down arrow ... it flips my screen right over, and even the mouse movement is inverted ... you can run anything upside down that you want ... I still have not tried a print form in this state though ...
 
Thanks for the come back jzr.
The operators on the assembly line will be using this app. when its done so it has to be user friendly.
There should be some code to rotate text on a form.
 
A quick search in this forum turned up Thread222-537164

See the strong man's example

HTH Hugh,
 
Thanks HughLerwill
From what I get from this thread is they are switching from hort. to vert. printing.
What I have done is, I created a second form the same size as the label that goes on the product with 2 line of text on it. On my inkjet it prints right side up. On the Zebra 140XiII printer it prints upside down, 180°. I rotated the print job 90° using the landscape/portrait with the driver of the printer. Now I need to got 1 more 90° which I ried using Printer.Orientation = 1 and 2 but even on my inkjet it would not rotate at all.
Here is the code I'm using

Private Sub cmdPrintLabels_Click()
Dim NumberOfCopies As Integer
Load Form2
Form2.txtModelNumberTop.Text = txtModelNumber
Form2.txtModelNumberBottom.Text = txtModelNumber
Form2.txtCustomerDateTop.Text = txtTopCustomerDate
Form2.txtCustomerDateBottom.Text = txtBottomCustomerDate
Form2.txtShiftSerialNumberTop.Text = txtTopShiftSerialNumber
Form2.txtShiftSerialNumberBottom.Text = txtBottomShiftSerialNumber

Printer.FontSize = 22
Dim X As Integer
Dim Y As Integer
For NumberOfCopies = 1 To txtNumberOfLabels
Printer.Orientation = 1
'Printer.Orientation = 2
X = 0
Y = 0
Printer.CurrentX = X
Printer.CurrentY = Y
Printer.PrintQuality = -4
Form2.PrintForm
Printer.EndDoc
txtSerialNumber = txtSerialNumber + 1
txtSerialNumber = Format(txtSerialNumber, "000")
txtTopShiftSerialNumber = ShiftCode & txtSerialNumber
Form2.txtShiftSerialNumberTop.Text = txtTopShiftSerialNumber
txtBottomShiftSerialNumber = ShiftCode & txtSerialNumber
Form2.txtShiftSerialNumberBottom.Text = txtBottomShiftSerialNumber
Next
End Sub

It's a good thing I love challenges...
 
what kind of label printer are you using?

I tried to have patience but it took to long! :) -DW
 
No. Checkout StrongM's first post in the thread. He uses a series of API calls to rotate the text. If you use something along his lines (setting myFont.lfEscapement = -1800) you will be able to print your text upside down on the form.

HTH Hugh,
 
Hi everyone
Thank you very much for your response I really appreciate it.
I ended up using a driver for a newer machine which had the capability to invert the print job.
But I want to try out your suggestion HughLerwill when I get a chance because I'd like to have the capability of doing it in VB.
Thank again everyone.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top