Click to See Complete Forum and Search --> : How to create a StdFont with Vertical Drawing capability?


Ravi Kiran
March 29th, 1999, 01:51 AM
Hi Gurus,


I want to create a vertical drawing font, and want to use like any other font.

For Ex: I create a font and set it to the Font property of a label say. And i adjust the labels height & width props. Is it possoble for VB to then draw in that label with this 'Vertical' font.

They app i am wroking on is a graph drawing routine. and i want to use this vertical font for Y-axis's label and values drawing.


Win-Api 'CreateFont' with escapement & orientation as 900 gives a vertical drawing font. But the return value is of type HFont. How do i convert this HFONT to StdFont of VB? Thisway, i can set this to any control, and it should be able to paint itself vertically, i presume!.


Any ideas are most welcome.


Thanks

Ravi Kiran

April 10th, 1999, 06:25 PM
You can find an example of how to do this at:

wwww.vbaccelerator.com

- Alex

Ravi Kiran
April 13th, 1999, 04:37 AM
Hi,

I had accomplised what i wanted with 'CreateFont'.
where in the vbaccelerator code, he uses CreateFontIndirect, to achieve the same result.

But then it is not same as StdFont, which i can set to .Font member of a label,button etc. and forget about painting the regions myself. Just imagine doing all the painting by 'VB' code...

Ravi

Alex Black
April 13th, 1999, 11:33 AM
Ahh.. i read your question too quickly. I don't know how to do it with stdfont.. perhaps there is someway you could copy a picture of the textbox and rotate that picture,but thats probably harder.

- alex