Solved

Rotate text in vb6

Posted on 2004-04-21
12
2,383 Views
Last Modified: 2007-10-18
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
Comment
Question by:Fraser_Admin
  • 6
  • 4
12 Comments
 
LVL 15

Expert Comment

by:Tomeeboy
Comment Utility
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
 

Author Comment

by:Fraser_Admin
Comment Utility
I can't seem to get this to print.  The code all runs, but it doesn't send it to the printer??
0
 

Author Comment

by:Fraser_Admin
Comment Utility
If I print this to my form the angle number  are a mess.
0
 

Author Comment

by:Fraser_Admin
Comment Utility
OK I got this working.  Is there anyway I can send a picturebox instead of text?
0
 

Author Comment

by:Fraser_Admin
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 15

Expert Comment

by:Tomeeboy
Comment Utility
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
 
LVL 15

Accepted Solution

by:
Tomeeboy earned 500 total points
Comment Utility
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
 

Author Comment

by:Fraser_Admin
Comment Utility
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
 
LVL 15

Expert Comment

by:Tomeeboy
Comment Utility
Any updates?

Thanks.
0
 

Author Comment

by:Fraser_Admin
Comment Utility
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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Problem to setup 18 78
sumHeights  challenge 17 59
strCount chalenge 3 50
how to update exe applicatio from internet ? 6 34
I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now