Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

I'm not really sure where this quest. belongs.....

Posted on 1999-01-05
3
Medium Priority
?
119 Views
Last Modified: 2010-05-03
0
Comment
Question by:groone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Expert Comment

by:DPickering
ID: 1454070
Use the TextWidth property of a Form to determine the width in pixels of some text for the Form's current font. For example:

Text1.Width = Form1.TextWidth("Blah")

Unless you're using Courier or some other fixed width font, you'll need to take into consideration the different widths for different strings even though they might be the same number of characters in length. If say the field's length is 5, I'd probably recommend finding the width of say 5 "W" or "M" (ie wide) characters to set the width of your text boxes to ensure that all of the text is visible.

Cheers,
Dave Pickering
0
 
LVL 3

Author Comment

by:groone
ID: 1454071
Nope, answer was provided.  Thanks.
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 0 total points
ID: 1454072
Since the question is answered. It better to remove this question. It's also zero points so you can do it safely.

To provide a reader of this question with an answer:
use an label control with the autosize property set to true
label1.text = "Hello"
text1.text = label1.text
text1.width = label1.width

0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question