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?
Printable View
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?
How about using the ToolTipText property?
Code:Picture1.ToolTipText = "Your text"
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.
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.
Use the Print method.
Code:Picture1.AutoRedraw = True
Picture1.Print "Hello"
'Save it into the Picture
Picture1.Picture = Picture1.Image
You can try with TextOut API function:
Hope this helps.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
i just used the picture1.print "Text"