Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Samir H.
  Where is Samir H.?
 Yogyakarta
 Indonesia
 Samir H.
 Tags
Subject: RE: Get scx name from within other form?
Thread ID: 289344 Message ID: 289383 # Views: 37 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Friday, December 31, 2010 11:15:48 AM         
   


> >
> >
> >
> > Samir, object.Name, e.g. "frmCustomers", is just a string, try the reference itself (if available):
> >
> >
> > If Type('_screen.ActiveForm.Name')='C'
> >     lcSCX = Sys(1271, _screen.ActiveForm)
> > 

> >
> >
> >
> > hth
> > -Stefan
>
>
> Yes, it works. Am I stupid! I hope next year I get smarter...
> Thanks
>

Glad to hear it works. And No, you are not. And Yes, I believe we all will :-)

Seriously, just for the records, the "name"/"reference" term is indeed used in a confusing way in Fox talk, IMO - as you know _screen.ActiveForm.Name is not an object reference anyway, as opposed to _screen.ActiveForm itself if available.
But (as you know) actually "frmCustomers" as a "name", i.e. m.frmCustomers, would be available if it's created and still in scope, e.g. by creating it via "Do Form ... Name frmCustomers" in a place that's still in the Call Stack, like "main.prg" at runtime.
Or by storing it somewhere else, like in a custom Thisform.oChildForm if that matches the requirement. Confusing.


Regards
-Stefan

ENTIRE THREAD

Get scx name from within other form? Posted by Samir H. @ 12/31/2010 4:03:47 AM
RE: Get scx name from within other form? Posted by Jignesh Parekh @ 12/31/2010 4:46:33 AM
RE: Get scx name from within other form? Posted by Samir H. @ 12/31/2010 5:01:40 AM
RE: Get scx name from within other form? Posted by Ony Too @ 12/31/2010 5:02:42 AM
RE: Get scx name from within other form? Posted by Samir H. @ 12/31/2010 5:26:37 AM
RE: Get scx name from within other form? Posted by Martina Jindrov√° @ 12/31/2010 9:38:33 AM
RE: Get scx name from within other form? Posted by Samir H. @ 12/31/2010 9:45:29 AM
RE: Get scx name from within other form? Posted by Stefan Wuebbe @ 12/31/2010 9:55:09 AM
RE: Get scx name from within other form? Posted by Samir H. @ 12/31/2010 10:11:50 AM
RE: Get scx name from within other form? Posted by Stefan Wuebbe @ 12/31/2010 11:15:48 AM
RE: Get scx name from within other form? Posted by Mike Yearwood @ 1/1/2011 4:04:06 AM