
-----------------------------------
jonos
Tue Jan 27, 2004 11:03 am

Positioning Text
-----------------------------------
Can i position text (like locate/locatexy in Turing) in VB, or do i have to create a text box and send it there... thanks people i just gave up on c for a bit (too hard) and will learn this.

-----------------------------------
McKenzie
Tue Jan 27, 2004 11:43 am


-----------------------------------
by far the easiest way is to make a label and set the visible propery to false. When you want to see your text just set it to true.

-----------------------------------
jonos
Tue Jan 27, 2004 11:53 am


-----------------------------------
can i put a variable in a label though, i want to output a string with variables after i get input from someone...

-----------------------------------
McKenzie
Tue Jan 27, 2004 12:03 pm


-----------------------------------
You want to change the value of the label like:

Dim cnt As Integer
Private Sub Timer1_Timer()
cnt = cnt + 1
Label1.Caption = "Current Time: " & cnt
End Sub


1. I'm using poor names for my controls so it would be easy for you to recognize them.
2. You can replace Label1.Caption with Label1 and it will work fine. VB knows that the caption is the most common property so if you leave it off it assumes that what you want.

-----------------------------------
jonos
Tue Jan 27, 2004 12:11 pm


-----------------------------------
ok, thanks
