Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Minimum form width

Status
Not open for further replies.

LindaRichard

Programmer
Feb 23, 2001
103
0
0
CA
I have a form and I would like to set it's width to 50. The problem is that
VFP 8.0 does not let me set the width property value to less than 106.
I tried looking under tools/options but this does not seem to be set anywhere.
Anyone have any idea I to bypass this limitation.

Thanks, for your help.
Linda
 
Why is it you need a form this narrow? You may be able to produce the effect you're after by putting a container on the form that is 50 pixels wide, and using the technique described in the "Creating Irregularly Shaped Windows Sample" topic in the help to make the form itself invisible.



-BP
 
In the load method of the form set the form width to what you want it to be.

thisform.width = 50
 
mantry

In the load method of the form set the form width to what you want it to be.

thisform.width = 50


I have tested that, and if you look at the debugger, at the form's width it resets itself at 106.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
i tested it just now...initial width was 375 i set it to 50 and did not reset it.....

are you sure u are not resetting to to what it originally was.....


good luck...
 
What you need to adjust is the .MinWidth property.

Brian
 
No, MinWidth won't do it. Mine's set to -1, which should mean no minimum width, and the smallest width I can specify is 117. That's with or without the TitleBar showing. I've also tried setting the form's Width to 50 in the load, but it's pretty obvious when the form is displayed that the width is still 117.



-BP
 
try .MinWidth=1 ... it seems that -1 doesn't really mean -1 in this case.

Brian
 
try .MinWidth=1 ... it seems that -1 doesn't really mean -1 in this case.

Cool! That worked! OK, so I learned something new here. ;-)




-BP
 
Thanks to all of you for taking the time to respond.
It's great to see so many people contributing to
solving a problem. Your help is appreciated.

Thanks
Linda
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top