Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Positioning Text
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
jonos




PostPosted: Tue Jan 27, 2004 11:03 am   Post subject: 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.
Sponsor
Sponsor
Sponsor
sponsor
McKenzie




PostPosted: Tue Jan 27, 2004 11:43 am   Post subject: (No subject)

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




PostPosted: Tue Jan 27, 2004 11:53 am   Post subject: (No subject)

can i put a variable in a label though, i want to output a string with variables after i get input from someone...
McKenzie




PostPosted: Tue Jan 27, 2004 12:03 pm   Post subject: (No subject)

You want to change the value of the label like:

code:
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




PostPosted: Tue Jan 27, 2004 12:11 pm   Post subject: (No subject)

ok, thanks
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: