OCX issue redux

This forum is for eXpress++ general support.
Post Reply
Message
Author
BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

OCX issue redux

#1 Post by BruceN »

We never resolved the focus issue with the credit card processing ocx and xbase/express. I've been working with the ocx develop, Rubin, on it but we still haven't resolved it.

Interesting thing... I have a small program in native xbase that works fine... the ocx always pops up on top. I also have a similar program using express (a little more complicated as I tried to duplicate as close as possible the exact operating scenario in our live progam). That one has the focus issue (ocx opens behing program and youhave to click on from task b ar to access it)!

I'm thinking there may be something in Roger's stuff that's causing it.... (but as my wife truly enjoys reminding me - I am frequently wrong).

Attached are 2 zips,one the version in native xbase (nodonnay.zip) and the other using express (donnay.zip). The ocx is in each project (the xml file included is the config info for the ocx).

Once loaded, the ocx works great - it accepts the info I give it and I get back the info I need. The ONLY issue is that it loads up BEHIND the app, not in front!

If needed, I can get you Rubin's email or phone number. Any assistance would be GREATLY appreciated as we have customers waiting on it.

As always, thanks in advance to all you wizards out there :)

bruce
Attachments
NoDonnay.zip
(1.64 MiB) Downloaded 901 times
Donnay.zip
(1.64 MiB) Downloaded 891 times
There are only 10 kinds of people - those who understand binary and those who don't :)

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: OCX issue redux

#2 Post by BruceN »

Minor thing I forgot to mention... the ocx needs to be registered with regsvr32 (of course, all you wizards prrobably knew that already).

Also, if any of you are looking for an integrated credit card solution, I will HIGHLY recommend ChargeItPro. Other than the focus issue, it works great and they are VERY helpful and cooperative - and also very ammeniable to suggestions.

If anyone is interested, drop me an email (bossman@ezpos.com - and I have my wife's permission to use that) and i'll get you contasct info and an introduction.

thanks,

bruce
There are only 10 kinds of people - those who understand binary and those who don't :)

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: OCX issue redux

#3 Post by BruceN »

I've been playing with it in my copious free time while not having a clue as to what I was donig and I think I strumbled onto the basic means of an answer:

Looking at the ocx code for their 'customer payment screen'

oEasyIntegrator:LoadSetup(SetupString)
trans := oEasyIntegrator:getProperty('TransFields')
trans:AmountTotal := 4
oCustomer := oEasyIntegrator:getProperty('Customer')
oCustfields := oCustomer:getProperty('CustomerFields')
oEasyIntegrator:Customer:CustomerFields:Clear()
oCustfields:FirstName := 'Enrico'
oCustfields:LastName := 'Fermi'
oCustfields:Company := 'E=mc2'
oCustomer:UpdatePayments('50243') //43234 //50243
StringSavedCustomerRef = oEasyIntegrator:Customer:CustomerRef
msgbox(StringSavedCustomerRef)

it appears that part of the code gives the ocx info, then the next line (StringSavedCustomerRef = oEasyIntegrator:Customer:CustomerRef) gives a return from the ocx. My thought was that between those 2 lines was where it actually loaded and I could put a setappfocus there. I tried that (setappfocus(oEasyIntegrator) ) and I get an xbase error AFTER the ocx closed.

oError:args :
-> VALTYPE: O CLASS: ActiveXObject
oError:canDefault : N
oError:canRetry : N
oError:canSubstitute: Y
oError:cargo : NIL
oError:description : Object is not registered
oError:filename :
oError:genCode : 103
oError:operation : setAppFocus
oError:osCode : 0
oError:severity : 2
oError:subCode : 4207
oError:subSystem : BASE
oError:thread : 1
oError:tries : 0

I'm not sure what 'registered' mean in this context.... but (hopefully) either the ocx can be 'registered' or I should be calling it something other than oEasyIntegrator for the setappfocus.

I hope that gives you wizards a direction so that one of you will have a lightbulb go off in your head.

as always... thanks
There are only 10 kinds of people - those who understand binary and those who don't :)

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: OCX issue redux

#4 Post by BruceN »

Well I finally figured it out. I had to put this:

oXbp := XbpActiveXControl():new( )
oXbp:CLSID := "{9A36ABD5-8EAF-4EC9-AA4E-04E631B399C1}"
oXbp:create()

before the oEasyIntegrator:=ActiveXObject():Create("cipwin32.EasyIntegrator")

I then treid using Roger's dcactivex instead, but I kept getting syntax erors (syntax - maybe that's how obama is gonig to pay for his agenda!)

OK, problem solved.... thankls to those who took the time to look at this.

bruce
There are only 10 kinds of people - those who understand binary and those who don't :)

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: OCX issue redux

#5 Post by rdonnay »

Bruce -

What are the syntax errors you were getting?

Show me the DCACTIVEXCONTROL code.
I use this in lots of apps.

Roger
The eXpress train is coming - and it has more cars.

Post Reply