Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Call a VFP object from VFP
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01496407
Message ID:
01496446
Views:
49
You cannot do that in a prg. Everything has to be built within the grid itself.

>ThaNKS
>
>the grid works but this does not:
>
>
> ADD OBJECT form1.grid1.column1.header1 AS header WITH ;
> FontSize = 8, ;
> Alignment = 2, ;
> Caption = "Qty", ;
> Name = "Header1"
>
> ADD OBJECT form1.grid1.column1.text1 AS textbox WITH ;
> BorderStyle = 0, ;
> Margin = 0, ;
> ForeColor = RGB(0,0,0), ;
> BackColor = RGB(255,255,255), ;
> Name = "Text1"
>
>
>
>
>
>
>>>I have an app which uses an external monitor to display data from another vfp app
>>>I created a project with a simple startup prg and a form and compiled it as an exe.
>>>then in my regular vfp app I do a run /n external.exe which works but when the regular app ends the called external app remains on the external monitor. then next time tha app starts it creates another external app and so forth
>>>
>>>I need to kill the external app somehow. Or better yet call it with create or newobject
>>>
>>>in order to accomplish this I used the object browser to convert the scx into a prg but that prg has errors in it when it comes to the grid definitions.
>>>
>>>how could I accomplish this?
>>>
>>>Thanks
>>>
>>>here is my startup prg:
>>>DEFINE CLASS xStart AS SESSION OLEPUBLIC
>>>
>>>
>>> PROCEDURE INIT
>>>
>>>
>>> DO FORM EXTERNAL\ExternalForm
>>> READ EVENTS
>>> IF VERSION(2)=0
>>> QUIT
>>> ELSE
>>> WAIT WINDOW "Good Bye"
>>> ENDIF
>>> ENDPROC
>>>
>>> PROCEDURE DESTROY
>>>
>>> ENDPROC
>>>
>>> PROCEDURE ERROR(nError,cMethod,nline)
>>>
>>> ENDPROC
>>>
>>>ENDDEFINE
>>>
>>>
>>>
>>>Peter
>>
>>
PUBLIC oform1
>>
>>oform1=NEWOBJECT("form1")
>>oform1.Show
>>RETURN
>>
>>
>>	**************************************************
>>*-- Form:         form1 (c:\rpm\form1.scx)
>>*-- ParentClass:  form
>>*-- BaseClass:    form
>>*-- Time Stamp:   01/18/11 09:08:12 AM
>>*
>>DEFINE CLASS form1 AS form
>>
>>
>>	DoCreate = .T.
>>	Caption = "Form1"
>>	Name = "Form1"
>>
>>
>>	ADD OBJECT grid1 AS grid WITH ;
>>		ColumnCount = 2, ;
>>		Height = 217, ;
>>		Left = 60, ;
>>		Top = 12, ;
>>		Width = 241, ;
>>		Name = "Grid1", ;
>>		Column1.Name = "Column1", ;
>>		Column2.Name = "Column2"
>>
>>
>>
>>ENDDEFINE
Previous
Reply
Map
View

Click here to load this message in the networking platform