|
-
Jun 26th, 2007, 09:11 AM
#1
[RESOLVED] Displaying text on a picturebox
I need a control for displaying text (coordinate values) as I move the mouse over a picturebox. I had thought of a label but I want to have more than one line. A multiline textbox won't work because it stays in the background underneath the picturebox so it's not visible. Any ideas?
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
-
Jun 26th, 2007, 10:09 AM
#2
Re: Displaying text on a picturebox
...and labels are nice because their backstyle can be set to transparent, otherwise maybe I'd use a picturebox.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
-
Jun 26th, 2007, 01:30 PM
#3
New Member
Re: Displaying text on a picturebox
Not sure exactly what you are trying to achieve, but if you want to use a lable, then set its autosize property to true, the use VBCrLF for multi-line use, eg,
Lable1.caption = "This is on line one" & vbcrlf & "This is on line two".
Hope this is what you are wanting.
John
-
Jun 26th, 2007, 01:42 PM
#4
Re: Displaying text on a picturebox
I had thought of a label but I want to have more than one line.
Labels can have multiple lines.
Code:
Private Sub Form_Load()
With Label1
.AutoSize=True
.BackStyle = vbTransparent
End With
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.Caption = "X: " & X & vbNewLine & "Y: " & Y
End Sub
-
Jun 27th, 2007, 03:05 AM
#5
Re: Displaying text on a picturebox
Thank you jsmcm and brucevde. I thought I'd use vbcrlf for new lines but I must have done something strange for when I tried it didn't work (and I was sober) so I had already given up the idea.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|