Putting text, from variables, onto labels in VB5
I got lots of good ideas from my previous thread, and all worked with no compiler errors.
But, my original question was how to get the results on the user's computer screen.
The Label option sounds promising, but I can't find any complete syntax guide or examples
of how to make a label, large enough to accept about 8 lines of string variables. I can handle
the formatting but first I need to get the data onto something the user will be able to see.
So far, the only thing I've got is a Form labeled "Question", which is the perfect size and in
a good position on the screen. But it never gets written to by any of the ideas.
Can anyone tell me how to declare and use a label control to try?
A sample display would look like this:
101 Leadership is something that has always been a subject that
can be learned easier than it can be taught. In the Air Force
how could we best define leadership?
a. First ship in a convoy
b. The art of influencing people to accomplish the mission.
c. The art of telling someone to "Go to Hell" so that they actually anticipate the trip.
Later I would add clickable buttons for answer selection and next question stuff
But I gotta get it on the screen first. Thanks for any help.
SMSgt Ron Davis, USAF, Retired
Re: Putting text, from variables, onto labels in VB5
Put a label on the form and drag it out to the size you want.
Add your text by assigning the caption property of the label. Append a vbCRLF at the end of each line to get the proper flow
Code:
Label1.Caption=MyLine1 & VBCRLF & MyLine2 & VbCRLF
Re: Putting text, from variables, onto labels in VB5
Ron
FYI, I replied to your prior thread with post #8.
Instead of a Label control, it used a TextBox control.
Just to give you an alternative approach.
Spoo
Re: Putting text, from variables, onto labels in VB5
Thanks, but I've only been working with VB5 for about 3 days. The Visual stuff is all new to me.
How would I put the label onto the form? And, if necessary, how would I define properties for the label, like AutoSize, etc?
I am soooooooooo close to finishing this project. The only thing now is to make it visible to users. Ideas are appreciated.
Ron Davis
Re: Putting text, from variables, onto labels in VB5
Spoo;
Thanks again, but that Post #8 must have been under my original username, RDavis53. I didn't write down the password, and the method for creating a new one is tedious, and I keep getting locked out for putting in wrong stuff. Dunno. Besides, Firefox keeps warning me about stuff.
TextBox sounds promising too. I'm working on getting a Label declared and assigning properties. GOD I MISS DOS!!!!
Ron
Re: Putting text, from variables, onto labels in VB5
Ron
See my post #9 in your other thread.
I'll describe the steps there.
Spoo
Re: Putting text, from variables, onto labels in VB5
Here is a simple quiz example....uses MS Access 2007, One Form, 3 textboxes (textbox1 is multiline--set in the properties during design time) and two command buttons.
Attachment 99643
Hope this also helps.