Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making a modal form only appear when needed???
Message
From
17/08/1999 12:48:07
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, United Kingdom
 
 
To
17/08/1999 10:57:08
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00254532
Message ID:
00254539
Views:
20
>I have a big problem. I am writting an international application and I needed a messagebox with the ability to change the button text. So I thought I'd make my own, all was lovely until I tried to make the form automatically adjust its width depending on the amount of text being sent.
>
>I have tried several ways including calculating the width using FONTMETRIC AND TXTWIDTH but because they work on an average width of a character for a font it was no good. So I got around it by placing the text into a label and setting the label to AutoSize. Then referencing the width of the label to calculate the form width. I have got it to resize but what I need to do is make the form only be shown after the form width has been changed. At present the form resizes itself so everyone can see it, which looks crap to put it plainly.
>
>Does anyone know of a way around this???
>
>Lee

Hi,

Forms automatically SHOW() when thay are run, classes don't.
Redefine your form as a class (or use the Save as class menu option), then just create an instance and show it (assuming the width is set in the init of the form).
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Previous
Reply
Map
View

Click here to load this message in the networking platform