Information générale
Catégorie:
Codage, syntaxe et commandes
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement