I have a small app I built, to fundamentally get some rotated text in a Picturebox, and then crop the picturebox to just fit the bounds of the text.
This does work.
I use the CreateFont API to establish a rotated font.
I assign that font to the Picturebox.
I set the picturebox currentx and currenty, the use "Print" to draw the text.
This does work (at least I get rotated text in the Picturebox).
Now the problem.
For a testing environment, I created a simple form, with some user input
objects, so a person could select a different font, size, forecolor, bold, italics, etc.
These objects all have labels identifying them, and then there are text boxes, lists, and checkboxes to specify the options.
There is a command button to actually perform the work.
So, run the app... either in development mode, or compiled to an .exe.
Click on the "Doit" button.... great, it rotates the text.
Just do this a few times, repeating the same stuff.
Now click on the "Bold" checkbox. Then "Doit". You might have to "Doit" a few times.
BANG... the font for the Bold checkbox now changes to bolded font.
And I think the fontname/face also is changed.
Now click on Italics checkbox. Then Doit... the Italics checkbox changes to bolded font.
Keep doing this with all check boxes... they change to bolded font.
Eventually the "Doit" button also changes.
If you are in development mode, and you then stop the program from running, the controls/objects on the form are STILL BOLDED font.
You actually have to close the project, and start it up again.
If you run the .exe, the same thing happens.
Something is walking all over something else.
I am running Vb6 (Visual Studio 6), with latest upgrades, Vista Ultimate,
on a pretty powerful (dual core, quad, 2.4GHZ, 4GB, 500GBDualRaid).
Can anyone figure out if the CreateFont API might be causing this?
By the way, I also do a BitBlt to copy the desired area of the picturebox to another picturebox.
Might THIS be causing the problem ?
I attach the project code for anyone wanting to look at it.