Results 1 to 3 of 3

Thread: create text image...

  1. #1
    chenko
    Guest

    create text image...

    VB Code:
    1. Public Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As Long
    2.  
    3. Public Sub Text2Picture(ByVal sString As String, ByVal PicBox As PictureBox, Optional ByVal posX As Long = 0, Optional ByVal posY As Long = 0)
    4.     TextOut(PicBox.hdc, posX, posY, sString, Len(sString))
    5. End Sub

    Im using this code to create an text image from a string... my question is that i would like to do the same, but, in a particular font? is this possible? i would like to also use fonts that are not installed on the system using the .ttf files i have



    cheers
    si

  2. #2
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    afaik you just have to set the font property of the PicBox you will do the output on.
    Sanity is a full time job

    Puh das war harter Stoff!

  3. #3
    chenko
    Guest


    duh, thanks, i was think... just change the font of the text box... no wait it only passes a string, lol... puzzled me all morning, hehe

    cheers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width