Results 1 to 2 of 2

Thread: [RESOLVED] Draw/Print text to picturebox

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2007
    Posts
    70

    Resolved [RESOLVED] Draw/Print text to picturebox

    Hi.

    I have been using BitBlt to draw images to a picture box and that is working great but I haven't figured out how to draw text onto it.

    Any help would be appreciated on how to draw text to a picturebox.

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Draw/Print text to picturebox

    For simple text use Print method - here is very basic sample code:
    Code:
    Private Sub Command1_Click()
        With Picture1
            .AutoRedraw = True
            .ForeColor = vbRed
            .Font.Size = 14
            .FontItalic = True
            .FontUnderline = True
            'and so on with fonts ...
            .CurrentX = 300
            .CurrentY = 100
            Picture1.Print "Hello World!"
        End With
    End Sub

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