Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class does not do its job in 7.00 version
Message
From
17/11/2006 12:31:45
 
 
To
17/11/2006 11:56:30
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01170713
Message ID:
01170754
Views:
12
>I have to call the application from inside the VFP7 application, I tried compiling my app as an exe file but it works the same as it was compied in vfp7.
>
>>Can you build a VFP9 EXE as COM server and use COM object reference in VFP7 instead of running routine?
>
>what do you mean exactly with it ?
>I never used com objects :-( but there is always a frst time :-)

Something like:
*** From your VFP7 routine

oSomething = CreateObject([MyVFP9EXEName.MyVFP9Class])
oSomething.DoSomething()
oSomething.oForm.Show(1)
Declare INTEGER SetForegroundWindow IN WIN32API INTEGER
SetForegroundWindow(ooo.OFORM.hWnd)



*** In VFP9 EXE (it must be EXE if you want to have user interface)
DEFINE CLASS MyVFP9Class AS CUSTOM OLEPUBLIC
    oForm = NULL
    
    PROCEDURE DoSomething()
          SYS(2335,1)
          this.oForm = CREATEOBJECT([Form1])
    ENDPROC
ENDDEFINE


DEFINE CLASS form1 AS form


    DoCreate = .T.
    Caption = "Form1"
    Name = "Form1"
    ShowWindow = 2
    DeskTop = .t.  

    ADD OBJECT label1 AS label WITH ;
        Caption = "Label1", ;
        Height = 17, ;
        Left = 40, ;
        Top = 33, ;
        Width = 251, ;
        Name = "Label1"


    PROCEDURE Init
        thisform.Label1.Caption = VERSION()
    ENDPROC
    PROCEDURE Destroy
*        CLEAR EVENTS
    ENDPROC

ENDDEFINE
*
*-- EndDefine: form1
**************************************************
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform