Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Top Level Form
Message
 
 
To
29/12/2000 11:37:13
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00457084
Message ID:
00457908
Views:
29
Gaylen,

>Thanks all for your help.
>
>I resolved the focus probem by moving the setfocus() to the init of the first field.

I wouldn't recommend this approach (even though it appears to have corrected your problem. The normal instantiation sequence for a form is Load, Control.Init, Init, Show, Activate and GotFocus. If you put a SetFocus in the Init of a control the sequence goes out of whack.

With the code addition above the new sequence is Load, Control Init, Activate, GotFocus, Init and Show.

While this may not be a big deal now, it might bite you in the a$$ later.

>
>I got the alt keys to work with the top level menu by creating another top level form and it works fine. It didn't like something in the old form. I don't know why, but it works now.
>
>I am having a problem with the menu however. I want the menu disabled when I am on a modal form. I have always use _screen.activeform..... in the skip for field to check to see if it is a modal form and it worked. With the top level screen it doesn't like the command. I tried removing the _screen but it doesn't recognize activeform.
>

I'm not sure what you mean here. Does VFP throw an error (and if so which one) when you add the skip for clause or does it just not disable to form? Are the forms you are dealing with all top-level? Top-level forms can not be modal. VFP will coerce the WindowType property to Non-Modal (0) even if you set it to Modal (1).

To have the top-level look you can configure the other forms ShowWindow property to 1 - Show in Top-level and also set the Desktop property to .T.. Then you make it modal and the nature of modal forms is to disable menu items.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform