Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading values from a form in an .EXE via OLE
Message
De
15/06/1998 11:42:28
Stewart Lane
Injection Footwear Corp.
Miami, Floride, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00106812
Message ID:
00108242
Vues:
34
John,

Hi. I've finally got everything worked out with using the OLE server.


The code below creates an object reference to the server and executes a
getparent method for association. Then you assign a screen handle (scrhand)
to refer to the objects in the server.

ox=createobject('abcole.olepassthru')
abc=ox.getparent()
scrhand=abc.eval("oWinMan.gethandle('ABCFORM')")

You can then do things like this:

scrhand.edit() - puts the screen in edit mode
scrhand.abcpageframe1.activepage = 3 - selects the third tab on the form
scrhand.abcpageframe1.page1.abcaddressset1.txtstate.setfocus - moves the cursor inside the field txtstate (using setfocus)

m=scrhand.m2mpageframe1.page1.m2maddressset1.txtstate.value - reads the contents of their txtstate field into'm' in my application.

scrhand.m2mpageframe1.page1.m2maddressset1.txtcity.value='Stew' - writes 'stew' into their city field.

This stuff is COOL! I had a lot of fun learning it and I admit I still have a
ways to go. I'm functional but totally in control yet!

Thanks for your help. If there are others out there that want to learn from my experience, I'll be happy to offer what I know.


Stew
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform