I would imagine you would need to set some sort of fixed length for Label1.
Why not check the maximum values of the column you are seeking in the
database table, then set a bendhmark maximum sixe you will allow your labelto
become. If the length of the lebel exceeds your benchmark maximum showa
message a resize it to something more realistic within the boundaries of your
application.
"Shawn" wrote:
If I want to get the number of characters returned from a database query and
then set the width of a control, what is a good formula or good practice to
do this? I have been using things like,
Dim result as Integer = Query.Length
label1.width = result * 10
But of course, the longer the text returned from the query, the wider the
control.