• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2517
  • Last Modified:

Rotate text in vb6

Using the vb6 printer object how can I rotate my text.

I want to print like this

Upright (0 degrees)   or
Shift text Sideways (90 degrees)  or
Shift text Upside Down (180 degrees)  or
Shift text Sideways (270 degrees)

           
0
Fraser_Admin
Asked:
Fraser_Admin
  • 6
  • 4
1 Solution
 
TomeeboyCommented:
Here is a VB class for printing rotated text to the screen or printer.  This should work for you:

http://www.devx.com/vb2themax/Tip/19101

Hope this helps!

Tom
0
 
Fraser_AdminAuthor Commented:
I can't seem to get this to print.  The code all runs, but it doesn't send it to the printer??
0
 
Fraser_AdminAuthor Commented:
If I print this to my form the angle number  are a mess.
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
Fraser_AdminAuthor Commented:
OK I got this working.  Is there anyway I can send a picturebox instead of text?
0
 
Fraser_AdminAuthor Commented:
This is what I am trying to do.  I have a barcode that I created and stored into a picture box.  I would like to be able to rotate it 90 degrees and then print it to the printer (with some other text which is also rotated).  I already have my text printing in the correct spot.  I just need to get my barcode out.

Thanks
0
 
TomeeboyCommented:
Hi Fraser,

Glad to hear that you were able to get the code working.  Is the barcode you are trying to rotate just a regular image in a picture box?

Tom
0
 
TomeeboyCommented:
I'm not sure the above script can rotate a picture, although I believe it can rotate text and put that text in a picture box.  I found a link to a VB script which can rotate a bitmap to the angle you specify, but I was only able to find a link to a zip file containing the code (no instructions on how to use it).  You might check it out and see if this would work for rotating your barcode.  You can probably figure out how to use it fairly quick.  I did read that this script is limited to a 256 color bitmap though, but if you're using a regular black & white barcode, that won't be an issue.  Here's the link:

http://www.syix.com/wpsjr1/array.zip

Let me know if this works for you.

Tom
0
 
Fraser_AdminAuthor Commented:
I am only using a black and white barcode.  I just took a quick look, but I will look further.  I will let you know how I make out.  
0
 
TomeeboyCommented:
Any updates?

Thanks.
0
 
Fraser_AdminAuthor Commented:
I havn't got a chance to look at it again.  It will be a couple of more days before I can.  Sorry I'm being so slow.  Trying to do to many things at once.  I will keep you posted.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now