Mahmood,
Let me give a little more explanation to Chrita's correct answer. In order for an object to have a visible presence and participate in the UI event loop it must be
contained within a form. Thus, you need to use thisform.AddObject() instead of CreateObject(). Check the
W i k i topic
http://fox.wikis.com/wc.dll?wiki~AddObject~VFPYou also don't want to be creating public memvars like that to hold object references. This forces your form into a situation where if a second copy is run at the same time it will obliterate the first form's grid object. You should always use a custom form property to hold references of objects you instantiate with CreateObject(). You still can use code like
this.oHelper = createobject( "myhelperclass" )
if the object is a non-visible entity. You must also make sure you
this.oHelper = .null.
in the Destroy() method to clean up.
> I created an object based on grid class. I want to display my grid object at run time, however, when I run my form the grid is not visible. Can any one tell me what is the problem with my codes below.
>Public MyGrid && public variable
>MyGrid = CREATEOBJECT("Grid") && object based on grid