Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Samir H.
  Where is Samir H.?
 Yogyakarta
 Indonesia
 Samir H.
 To: Martina Jindrová
  Where is Martina Jindrová?
 Trutnov
 Czech Republic
 Martina Jindrová
 Tags
Subject: RE: Get scx name from within other form?
Thread ID: 289344 Message ID: 289373 # Views: 33 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Friday, December 31, 2010 9:45:29 AM         
   


> >
> > Perfect, Ony. Thanks.
> >
> > All of these work. I went for the last one...
> >
> >
* frm2.load()
> > IF TYPE('_vfp.ActiveForm')='O'
> > 	cFrmName = _vfp.ActiveForm.name
> > 	? SYS(1271,&cFrmName)	
> > 	? SYS(1271,EVALUATE(cFrmName))	
> > 	? SYS(1271,EVALUATE(_vfp.ActiveForm.name))	
> > ENDIF 
> > 

> >
> > The rating seems not working, so my rating to you from here... :)
> >
> > Edited
> > After further testing, I saw that the above codes don't work in a standalone exe. It works only in the IDE. Do you know why it's like that? Is it because the scx is included? The physical .scx still exists though, when I run the exe.
> > The error I get is "Variable 'FRMCUSTOMERS' is not found", where "frmCustomers" is _vfp.ActiveForm.name in the code above.
> > Note that in the IDE everything works as expected.
> >
> > Regards
> > Samir
>
>
> The correct is
>
* frm2.Init()
> ? SYS(1271,This)	
> 

>
> calling SYS(1271,This) in load cause error, because the form do not exists.
>
> MartinaJ
>
> JID: gorila@dione.zcu.cz

Hi Martina, happy new year.
I want the scx name of the calling form, that's why I used load(), since _vfp.activeform still references the calling form. Do you have an idea how to do that? Please note that the previous codes work when I launch the form from the project manager, but not in a standalone exe.


Regards
Samir

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