Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. articles. downloads. faq. members. files. rss.
 From: Koen Piller
  Where is Koen Piller?
 Santpoort-Zuid
 Netherlands
 Koen Piller
 To: Gerrit Broekhuis
  Where is Gerrit Broekhuis?
 Holten
 Netherlands
 Gerrit Broekhuis
Subject: RE: Object error with top-level form
Thread ID: 438209 Message ID: 438211 # Views: 54 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Thursday, July 7, 2016 4:56:42 PM         
   



> Hi,
>
> I have a main.prg calling a form as top level form named MAINFORM. For shutdown I call a procedure in main.prg, with the command
>
>
MAINFORM.release()

>
> I get the error "MAINFORM is not an object". I can see that MAINFORM is present in _screen.forms, even though MAINFORM is a top-level form. I'm puzzled.
> The error must be caused by the form, being a top-level form. How should I address properties on MAINFORM?
>
> Regards, Gerrit

Gerrit,

I dont know how you instantiated your mainform, but I do know you can do:


DO Form frmMain NAME m.goMainwindow


if you than want to close that mainform programmaticaly you can:


goMainwindow.Release


Groet,

Koen

ENTIRE THREAD

Object error with top-level form Posted by Gerrit Broekhuis @ 7/7/2016 4:04:56 PM
RE: Object error with top-level form Posted by Koen Piller @ 7/7/2016 4:56:42 PM
RE: Object error with top-level form Posted by Gerrit Broekhuis @ 7/7/2016 8:35:02 PM
RE: Object error with top-level form Posted by Mike Gagnon @ 7/8/2016 1:47:42 AM
RE: Object error with top-level form Posted by Gerrit Broekhuis @ 7/8/2016 8:34:53 AM
RE: Object error with top-level form Posted by Koen Piller @ 7/8/2016 8:43:05 AM
RE: Object error with top-level form Posted by António Lopes @ 7/8/2016 10:34:23 AM
RE: Object error with top-level form Posted by Gerrit Broekhuis @ 7/8/2016 10:55:27 AM
RE: Object error with top-level form Posted by António Lopes @ 7/8/2016 11:30:30 AM
RE: Object error with top-level form Posted by Koen Piller @ 7/12/2016 1:54:02 PM
RE: Object error with top-level form Posted by Gene Wirchenko @ 7/7/2016 7:35:48 PM