text and graphics

how do you place text on a form without using control boxes and without changing the graphics coordinates .

ie I want to draw lines and next to the lines put there length The number of lines is specified by the user
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You don't mention but I'm assuming Visual Basic. To do this, change your x,y positon with CurrentX and CurrentY. Then put text on the form with "Print" command, as below. I'm not positive if this changes the "graphics" coordinates as you mention but if it does, just store off the CurrentX and CurrentY like oldX = form1.CurrentX, then reset them after you are done.
If you're not using Visual Basic I guess you can reject the answer.

Private Sub Command1_Click()
    Form1.CurrentX = 500
    Form1.CurrentY = 100
    Print "My Text"
End Sub

BTW, something else you may be interested in if you don't already know about it you can use textHeight and textWidth. They tell you the height/width of the text to be printed. Use it like Form1.textHeight("My Text") and you will be able to see how high the text will be. Just sounded useful if you're going to have lines going between the text. ;)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cathyis5Author Commented:
thanks - I will try it
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.