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: Sithu Kyaw
  Where is Sithu Kyaw?
 Yangon
 Myanmar
 Sithu Kyaw
 Tags
Subject: RE: Form.Init and Grid.Init
Thread ID: 365743 Message ID: 365759 # Views: 54 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Monday, December 31, 2012 9:40:27 AM         
   


> I'm trying to use a parameter, which is passed to Form.Init(), in Form.Grid.Init(). Is it possible?
> For example,
>
> DO FORM 'myform.scx' WITH 'test'
> 

>
> I want to know 'test' in Form.Grid.Init(), but I think the form event sequence is
>
>
> Form.Load()
> [controls].Init()
> Form.Init()
> 

>
> How can I achieve this?
>
> With Regards,
> profile for Sithu on Stack Exchange, a network of free, community-driven Q&A sites

I think that you cannot send any values to the grid.init(), unless you use some public var/object. If you call your form from within another form, then you can avoid a public var by using _vfp.activeform in the load event, and retrieve property values from the calling form. In the form's load event, _vfp.activeform returns the calling form and NOT the form where the code is written.
In any case, it would be interesting to know what you want to do, so that people could suggest you solutions or alternatives.

* called Form.load()
oCallingForm = _vfp.activeform
messagebox(oCallingForm.caption)


Regards
Samir

ENTIRE THREAD

Form.Init and Grid.Init Posted by Sithu Kyaw @ 12/31/2012 4:37:18 AM
RE: Form.Init and Grid.Init Posted by David Mustakim @ 12/31/2012 5:09:34 AM
RE: Form.Init and Grid.Init Posted by Sithu Kyaw @ 12/31/2012 6:03:43 AM
RE: Form.Init and Grid.Init Posted by David Mustakim @ 12/31/2012 11:30:43 AM
RE: Form.Init and Grid.Init Posted by Sithu Kyaw @ 1/1/2013 9:15:44 AM
RE: Form.Init and Grid.Init Posted by tushar @ 1/1/2013 9:22:21 AM
RE: Form.Init and Grid.Init Posted by David Mustakim @ 1/1/2013 9:32:38 AM
RE: Form.Init and Grid.Init Posted by tushar @ 1/1/2013 9:38:46 AM
RE: Form.Init and Grid.Init Posted by David Mustakim @ 1/1/2013 9:46:17 AM
RE: Form.Init and Grid.Init Posted by David Mustakim @ 1/1/2013 9:27:40 AM
RE: Form.Init and Grid.Init Posted by tushar @ 12/31/2012 5:43:45 AM
RE: Form.Init and Grid.Init Posted by tom knauf @ 1/7/2013 9:56:48 AM
RE: Form.Init and Grid.Init Posted by Samir H. @ 12/31/2012 9:40:27 AM