Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I have a Label. a button. When I click button, label rotates at any angle.
How can I rotate a label control?
I'm using VB6

Thanks
Posted
Updated 12-Jan-15 20:07pm
v2

1 solution

In VB6 you can't rotate the (standard) label. There were some 3rd party controls available at the time that would allow it - I can't remember the library name(s) and I doubt that they are still available.

You can however give the impression that a label is being rotated by drawing text onto a picture box.

There is an example here http://www.vb-helper.com/howto_center_rotated_text.html[^]

Be aware that if you try to print the rotated text you will have issues - this MS Techsupport article[^] describes a way around it, although I have never tried this.

If you have an option to move away from VB6 are you aware that the Express versions of Visual Studio .NET (including VB.NET) are free to download - http://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx[^]
 
Share this answer
 
Comments
Phuong Nguyen Thi 13-Jan-15 23:21pm    
Thanks a lot. "There were some 3rd party controls available at the time that would allow it " it means usercontrol?
CHill60 14-Jan-15 5:48am    
You could write a user control but I was originally referring to a paid-for package. DevExpress I think they were.
Phuong Nguyen Thi 15-Jan-15 2:42am    
Thnks, but my project only use standard control for a long time. Any solution else?
CHill60 15-Jan-15 4:20am    
Just that idea on the link I included - draw the text onto a picture box to make it look like a label
Phuong Nguyen Thi 15-Jan-15 4:56am    
OK, i think devexpress not support VB6 at present. I didn't find the controls files .OCX for VB6 on package.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900