I just have loaded an image in picturebox.
Now i need to show a label on image, possible.
I just tested to set the label bring to the front, but i dont see anthing!
i'm on VB6
SHOW label on picturebox
-
- Administrator
- Posts: 78485
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: SHOW label on picturebox
Have you tried using a text box instead of a label?
Or place this code at the top of the form module:
and use code like this to draw text on the picture box:
where Picture1 is the name of the picture box.
Or place this code at the top of the form module:
Code: Select all
Private 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
Code: Select all
Dim sText As String
sText = "This is my text"
TextOut Me.Picture1.hdc, 5, 10, sText, Len(sText)
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4355
- Joined: 26 Apr 2010, 17:36
Re: SHOW label on picturebox
Ok
But i need to use a mousemove on text, i can?
But i need to use a mousemove on text, i can?
-
- Administrator
- Posts: 78485
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: SHOW label on picturebox
No, that won't work if you use TextOut.
Have you tried using a text box?
Have you tried using a text box?
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4355
- Joined: 26 Apr 2010, 17:36
-
- Administrator
- Posts: 78485
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: SHOW label on picturebox
You can set the background style of the text box to Transparent.
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4355
- Joined: 26 Apr 2010, 17:36
Re: SHOW label on picturebox
hummmmm.
I dont see in any part of property Transparent option.
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78485
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: SHOW label on picturebox
Hmmm... see if this helps: transparent text box or label with scrollbars??
Best wishes,
Hans
Hans