Results 1 to 7 of 7

Thread: Text on picturebox

  1. #1

    Thread Starter
    Addicted Member slashandburn's Avatar
    Join Date
    Aug 1999
    Location
    Marietta, Ga
    Posts
    229

    Question

    I need to put a timestamp on images that my program creates so how can i put text onto the image in a picture box?

  2. #2
    Guest
    How about using the ToolTipText property?

    Code:
    Picture1.ToolTipText = "Your text"

  3. #3

    Thread Starter
    Addicted Member slashandburn's Avatar
    Join Date
    Aug 1999
    Location
    Marietta, Ga
    Posts
    229

    Question

    no texttooltip willnot work i want to actually put text
    onto the image so when i open it it is on it. Or Draw Text
    onto it.

  4. #4
    PowerPoster Arbiter's Avatar
    Join Date
    Sep 2000
    Location
    Manchester
    Posts
    2,276
    I remember another thread not so long ago (within the last month or so) which dealt with this problem.

    Try and hunt it down. If you can find it or it doesn't answer the question, post again to bring this to the top of the list.
    Gentile or Jew,
    O you who turn the wheel and look to windward,
    Consider Phlebas, who was once handsome and tall as you...

  5. #5
    Guest
    Use the Print method.
    Code:
    Picture1.AutoRedraw = True
    Picture1.Print "Hello"
    'Save it into the Picture
    Picture1.Picture = Picture1.Image

  6. #6
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242
    You can try with TextOut API function:
    Code:
    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
    
    Sub PrintText(strText As String)
        TextOut Picture1.hDC, 3, 1, strText, Len(strText)
    End Sub
    Hope this helps.
    Zvonko Bostjancic
    Ilirska Bistrica, Slovenia
    [email protected]
    Using VS6 Professional with SP3
    Programming mostly in VB and I've started to learn VC++ & MFC

  7. #7

    Thread Starter
    Addicted Member slashandburn's Avatar
    Join Date
    Aug 1999
    Location
    Marietta, Ga
    Posts
    229
    i just used the picture1.print "Text"

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