>>>>I have a top level form in my application that has suddenly begun appearing behind the main vfp window when called from the menu. I made a minor unrelated change (adding a textbox to page on a pageframe) and this behavior has shown up.
>>>>
>>>>The form has a dialog called from it's Init method to choose a location to open, whcih appears as it should, but as soon as that is entered the main form flashes and then immediately gets behind the main application window.
>>>>
>>>>I have a method called GetonTop() that I have used in these situations before, which does this:
>>>>
>>>>
>>>>WITH This
>>>> .AlwaysOnTop = .T.
>>>> .AlwaysOnTop = .F.
>>>>ENDWITH
>>>>
>>>>
>>>>That has usually resolved things like this before, but no luck. Setting focus to one of the controls also does not get it in front. Any ideas would be helpful.
>>>
>>>Did you check that .AlwaysOnBottom is not .T.
>>
>>Yes, that property is not set to .T.
>>
>>Desktop = .T.
>>ShowWindow = 2 - As top level form.
>>Windowstate = 0 - Normal.
>>AlwaysonTop = .F. (this is toggled in the above mentioned method, but left as .F.)
>>AlwaysonBottom = .F.
>
>Sorry, but you said yesterday that your application doesn't have top-level form. If you have ShowWindow=2, it means that you have one. This case you should get rid of VFP main window, i.e. _Screen. Set _Screen.Visible=.F.
There are several forms in my application that show as top level forms. The application has over 300 forms in it. I found that if a given form needed to have dialogs called from it, it works better to have that form set as a top level form so the dialogs, which are set to display in top level form don't wander off.
Jim Newsom
IT Director, ICG Inc.