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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rotate richtextbox 1

Status
Not open for further replies.

petermeachem

Programmer
Aug 26, 2000
2,270
GB
Does anyone know how to print the contents of a rich text box rotated?

I can rotate a text string ok, but cannot work out how to apply formatting a la rtf. Peter Meachem
peter@accuflight.com
 
You can take the text with richbox.text and then can take the length of the string then rotate it using an array of characters...
 
I mean printed out vertiaclly up the page or from corner to corner for instance.
I'm afraid I don't understand the second comment Peter Meachem
peter@accuflight.com
 
The only way that I am aware of for doing this is to actually rotate the bitmap that represents the RichTextBox.

If you are using NT/2000/XP then consider using the plgblt API call.

If using W98/ME/NT/2000/XP you also have the option of using the GDI+ class library (built-in for 2000/XP, downloadable from Microsoft for W98/ME), which has a bitmap rotation function.

If using W95, then you'll have to do it by hand...
 
I was rather afraid that it would be a bit tricky. I'll stick with straight text for now, the only current requirement is to print a barcode up the side of the letter. Peter Meachem
peter@accuflight.com
 
If you restrict the (text) rotation to 90 degrees, you can just rotate the text.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Can you? I can't see any properties to do that. Peter Meachem
peter@accuflight.com
 
You said you could rotate test, and I do recall having done it. I do not remember the process (property / method), but muct the same concept. Org wanted to have invoices in file, but be able to read cust & invoice # easily w/o taking paper from file. If I get a chance later, I will look for the routine.

I do know that it was pure VB printer procedures, no third party stuff w/ "controls".

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
I use the TextOut api call plus a load of other bumpf. Textout takes a string as a parameter and not rtf. Peter Meachem
peter@accuflight.com
 
As long as the barcode is generated with a FONT (Bar39?), it (textout API ...) should be just fine. If it is a home grown graphic, it can be tedious but it is just a transform to rotate an image and paste it on the sheet (in an image control).

Since I'm not currently employed, I do not have a barcode font avail, so I'm not able to do a 'canned' routine and be sure it is working properly.

" ... up the side of the letter ... " doesn't really say what rotation you want.


MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top