I know of something I could try to do, but it may be more complex than you need/want. With some API functions you can actually create fonts that are rotated to various angles, and then pop the font itself into a DC. If you did that to, say, a picturebox, any text printed from that point is going to be rotated in that manner. I can try to make up a fast control if you want this kind of thing (I might be able to use it later so I think I'll make it up anyway ).
I'm baaaack... VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too
Out of curiosity, how are you attempting to do the rotation? I've made up a control to do it, but I've never tried to persist an object inside a UC before. I'm getting varying results, but not a 100% working control. It does rotate text though. I'm trying to work out the way to keep the text centered relative to the extent of the control itself.
I'm baaaack... VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too
I put that in there except for the direction of rotation, but that's easy to add in. I never thought about it, but I'm so accustomed to using trig everywhere that I never think of doing anything but counterclockwise . I'm having a problem keeping the font info there though. I can persist a font object in other controls, but I think I may be losing a font object (as a result of DeleteObject and giving it the wrong one), and it's messing it up.
I'm baaaack... VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too
Well here it is. After many changes, and scrapping things that didn't work, and then kicking myself a lot after realizing I was trying to do the simplest of things complex ways (like attempting to persist the rotated font, which was a no no, so I switched to just repainting it on demand), I finished it. Tell me what you think, or if there are any problems.
I'm baaaack... VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too
It's not seeming to rotate for me. It just moves it around in the label. How do you use it? I am setting the angle to different degrees, but it doesn't do anything.
Nevermind! I got it to work. I changed the font from MS Serif to Arial and it worked fine! Cool control. I'll be able to use this somewhere.
______________________________________________________________________
I figured out what was wrong. If you have the font size the default, it doesn't rotate, but once you change the font size it works. MS Serif and 8 pt don't go together well. They play dirty.
Last edited by MidgetsBro; Jun 26th, 2001 at 03:21 AM.
Heh heh. I forgot to mention that. Only TrueType fonts can rotate, and the default font it has is part of the OEM charset (I think). TT is the ANSI charset. There's only a couple of those anyway. Like MS Serif, MS Sans Serif, Fixedsys etc. But any other font works fine. If you pick one of those, it will attempt to make a substitution if there is some angle specified. It will display any of them at 0° though.
I'm baaaack... VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too
If that is true, why did it work when I left it at MS Serif, but I changed the font size up one? Well it doesn't really matter, it's still a cool control.
PS where are you in the world? It's like almost 2 AM here (California, USA)
Hmm... well maybe there's just something about that font. Anyhow, it's not one I like . All my VB things get Tahoma, or Courier New if I need a monospace one.
I'm 3 hours behind you, on the east coast in Virginia.
I'm baaaack... VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too
I'm a night person, and I don't sleep very much. I'm generally up until 4-5 am during the summer or when I don't have obligations that require me to be elsewhere at early times in the morning. During classes though I have to force myself to assume a "normal" schedule . But I do better during the summer when I can return to what I call a normal schedule. The time difference is 3 hours later. when it's 12 pm your time, it's 3 pm my time.
I'm baaaack... VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too
Originally posted by MidgetsBro If that is true, why did it work when I left it at MS Serif, but I changed the font size up one? Well it doesn't really matter, it's still a cool control.
How did you change the font size?
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
Well here it is. After many changes, and scrapping things that didn't work, and then kicking myself a lot after realizing I was trying to do the simplest of things complex ways (like attempting to persist the rotated font, which was a no no, so I switched to just repainting it on demand), I finished it. Tell me what you think, or if there are any problems.
But reply on the thread, and poof, I can appear (thanks to getting an email about a response, otherwise I would have never thought about the forum again). I got really busy with work and other stuff, and didn't mess around with VB much for a long time, and one of the consequences was that I didn't hang around in the forums much either, and eventually I must have forgotten about it. For a while I was messing with VC++ 6 since I had just bought it around that time, so that also contributed to a decline in the VB things. The last thing I remember doing with VB was writing a program that I needed in the microbiology lab where I worked, but that was more than 2 years ago, and now I can't even remember what exactly it was for.
I'm glad to see that people like what I had made though, even though it has been so long. I'm surprised that I could still remember my password and login, and that my account did still exist. Most of the people I remember posting quite a bit are probably moderators by now too.
I may start hanging around again though and mess with VB/C++ some more to get familiar with it again, since this has piqued my interest again, and it would probably be useful in the future. I need to update that signature too... that thing is really outdated in the post preview I just looked at.
I'm baaaack... VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too