Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Overlapping forms
Message
From
02/03/2005 06:41:25
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00991665
Message ID:
00991901
Views:
21
PMFJI Terry,
The form is not modal, hence code continues to run after "do form..." and visible = .t. ( or .Show()) is executed.
Simple solution is to make it modal. Alternatively you could hide() caller form but pass form's reference to called form and it calls this.oCaller.Show() in its unload. Something like:

thisform.Hide()
do form serForm with this, otherParms

* Called form init
lparameters toCaller, ...
this.Addproperty('oCaller',toCaller)
*....

* Called form unload (or release)
loCaller = this.oCaller
this.oCaller = .null.
loCaller.Show()

Yet another alternative is not to call another form. Instead import results are shown in a container temporarily added to 'caller' directly. ie:

thisform.NewObject("ImportResults",...) && Container class resize itself to cover other objects
thisform.ImportResults.Visible = .t. && Its 'Exit' button calls parent.parent.removeobject(this.parent.name)

Cetin

>Hi Borislav
>
>Thanks
>
>No, that didn't make a blind bit of difference. The calling form still stayed on top and showing strangely enough. However, I sussed the problem. The error display form should have been modal, as I want the user to peruse it and force him to close it before going on. I must have temp. taken modal off, for testing, e.g. so I could browse the table, and forgotten to reinstate it.
>
>Now there is no need even to disappear the calling form - it stays in the background till the error form closes.
>
>Still I'm not sure of the reason why the calling form doesn't obey unless the error form is modal.
>
>Cheers
>
>Terry
>
>>Terry try this:
>>
>>  If .lDiscrepancies
>>     Select serCIFErr
>>     Use
>>     thisform.Hide()
>>
>>     Do Form serImportCIFErrors
>>
>>     thisform.Show()
>>  Endif
>>
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform