ActiveX revisited

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

ActiveX revisited

#1 Post by BruceN »

I'm still having the focus issue with the activex control. No matter what I do it still opens behind the other windows. There's suposed to be a ':ToFront()' method for activeX controls, but I can't seem to get it to work. I've tried using Rogers dcaxtivex and have same issue.

Attached is a simple sample showing the problem. We have a customer screen. A hotkey (or button) calls up a credit card name/company screen (this info needs to be fed to the activex for it to remotely create a new customer). From that we call the activex (which stores credit card info securely and can process credit card sales with those cards). Any help from you 'wonder wizzards' would be GREATLY appreciated. My limited knowledge is at a dead end.

(Note: the activex control needs to be registered (regsvr32 C:\Windows\System32\cipwin32.occ) and when you run the program and call the activex the first time you typically get a certificate request and then an error msg. The second time (and subsequently) it loads fine - except for the focus issue.)

Again, thanks to all,

bruce
Attachments
activex.zip
(1.87 MiB) Downloaded 1019 times
There are only 10 kinds of people - those who understand binary and those who don't :)

bwolfsohn
Posts: 649
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: ActiveX revisited

#2 Post by bwolfsohn »

Bruce,

I've done almost nothing with activex, but i always take the "other road" when looking at things..

Since you can't bring the activex dialog to the front, can you send your app to the back ?? or minimize it when the dialog is open ??

just a quick (probably dumb) suggestion from someone who looks at things through an upside-down looking glass..


Brian
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

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

Re: ActiveX revisited

#3 Post by BruceN »

Brian:

I appreciate the of-the-wall thought. I tend to think that way too (I've been told that I travel to the beat of a different kazoo.) However, in this case I don't know if that will work as we have a main menu window (which is still a crt screen) and the gui customer screen pops up over that. We also prevent the windows from being minimized (too many people used minimize it, forget it was there, and open up another copy of the program - our typical user is a dumb retail clerk with the iq of a fence post).

But thanks for the thought
There are only 10 kinds of people - those who understand binary and those who don't :)

User avatar
Tom
Posts: 1185
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: ActiveX revisited

#4 Post by Tom »

Hi, Bruce.

I will take a look at it tonight (it's 4 pm in Germany).

ToFont() and ToBack() are methods to manipulate the z-order of windows and objects. It doesn't effect the parent-child-relation or something like this. If two objects on a window overlap, ToFront()/ToBack() will help to organize this, but normally, these methods are not used very often, since objects on a window are placed correctly by the programmer. It has almost nothing do to with eventhandling or focussing.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

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

Re: ActiveX revisited

#5 Post by rdonnay »

Bruce -

They are obviously doing something unusual in the creation of their screen.
When their screen is deployed you can't even move the other screens.
It's as though their control is interfering with Xbase++ events.

I looked at their docs and it isn't obvious how to solve this problem when using their screen.
I would suggest using their product in "Silent Mode".

Step 2. Create New Customer – Silent Mode

The following code will create a new customer on the gateway and not display anything. Unlike Interactive
Mode, you will have to create your own screen to manage payments within your system.
Note: All fields for an existing customer get overwritten every time the UpdateCustomer function is called.
For example if you don’t populate FirstName when you call UpdateCustomer for the customer below the 2nd
time, “John” would get deleted from the gateway.
Note: The only difference here between Interactive Mode and Silent Mode is that UpdatePayments is used in
Interactive Mode while UpdateCustomer is used in Silent Mode.

Code: Select all

easyIntegrator.LoadSetup(StringSaveSetup)
easyIntegrator.Clear()
'Company or LastName is required.
easyIntegrator.Customer.CustomerFields.Company = "Bob's Boats"
easyIntegrator.Customer.CustomerFields.FirstName = "John"
easyIntegrator.Customer.CustomerFields.LastName = "Doe"
easyIntegrator.Customer.CustomerFields.CustomerID = "YourID 123"
easyIntegrator.Customer.CustomerFields.Phone = "123-456-7890"
easyIntegrator.Customer.CustomerFields.EMail = "ansonl@chargeitpro.com"
'use 0 to create new customer, otherwise pass number of customer to update
easyIntegrator.Customer.UpdateCustomer("0")
'save to use later to process a payment for this customer
StringSavedCustomerRef = easyIntegrator.Customer.CustomerRef
Delete Customer- Silent Mode
The following code will delete a customer from the gateway.

Code: Select all

easyIntegrator.LoadSetup(StringSaveSetup)
easyIntegrator.Clear()
easyIntegrator.customer.DeleteCustomer(StringSavedCustomerRef)
The eXpress train is coming - and it has more cars.

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

Re: ActiveX revisited

#6 Post by BruceN »

Nothing is ever easy in my life :)

If we have to go silent, then I guess we will have to. Howeever, I'd REALLY rather avoid that as there are other screens they use which have the same focus issue and we'd have to work around thosae as well - and that would eliminate (or make quite difficult) the ability to do some things.

I was hoping that if we solved the focus issue here it would solve it for the other screens as well!

I've forwarded your thought to Rubin , rubenm@chargeitpro.com (their developer). Maybe he will have a thought as to why.

As always, thanks again....
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: ActiveX revisited

#7 Post by BruceN »

Tom:

ANYTHING you can do would be greatly appeciated. I'm at the point of loading up the AK and going postal :)

mucho thankso

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

Post Reply