>I have always used not proportional fonts ( Courier 10 ) in my FoxPro 2.6 forms; every fields in my Fox Forms accept only the number of Chars corresponding to the field width in the .dbf, and the width of the text box is calculated from a personal version of GENSCRN , the program that in Fox generate the source from the designed form :this width is exactly corresponding to the number of chars that is possible to write.
>Now that i'm using VB5 i have the problem of the width of the text box ( no problem for the max number of chars, there is the apposite property MaxLenght ) :for example i would write a simple program that read the MaxLenght property of my text boxes and calculate the Width property ( considering if i use Courier new 10, 8 or Courier 10 or whatever non proportional fonts that i need to use ).
>In other words if my user enter a Lastname of 20 char it should enter only 20 char and the text box contains only 20 chars.
>If someone could help me thank you very much in advance.
Have you tride setting the Autosize property of the object? Sorry if this is not he answer (for I the don't understand your problem)
Andy van Steijn
ing. bureau Inforum B.V.
Leidschendam
Netherlands