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

Rotating Images & Text

Status
Not open for further replies.

quovuz

Programmer
Oct 13, 2002
21
0
0
PH
How do i rotate images and text in VB6? Do I need to make API calls? And what API calls are these? Thank you very much!
 
Rotation of an image is simply the tedium of collecting the individual pixel points, 'do(ing) the math and re-writting the pixels in their 'new' postions. Many (most) discussions re this process use (or recommend) the use of a second picture (or other image) control. Use some code to assure the two are sixed and positioned concurrently. Read from first, write to second. When complete, put second in front (or original in back).


MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
You can print rotated text to a form/picturebox by using a combination of these API functions:

CreateFontIndirect
SelectObject
TextOut
DeleteObject

I usually recommend Dan Appleman's books on the Windows API, but this technique was described better in the book Visual Basic 6 Win32 API Tutorial, written by Jason Bock, published by Wrox Press. I believe the technique was supposed to work with all TrueType fonts, but I could not get results from Wingdings, Symbol, others.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top