ActiveX focus issue

This forum is for eXpress++ general support.
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: ActiveX focus issue

#11 Post by rdonnay »

Don't close the EasyIntegrator window, instead close the dialog window.

If the EasyIntegrator window is a child of the main dialog window, it will automatically close.
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 focus issue

#12 Post by BruceN »

Correction:

With easyintegrator open I cannot close the dialog window by any means (ok, cancel, click X). When I close easyintegrator, the dialog window is still open.

Ideally, I'd like to have the dialog window either invisible or completely hidden behind the easyintegrator screen (I can easily change the size for that) and when easyint closes, the dialog window would close also. Can that be done? Can the dialog window have knowledge of easyint closing then close itself?

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

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

Re: ActiveX focus issue

#13 Post by rdonnay »

Your question is confusing.

If the dialog window is the PARENT of the ActiveX window, then you can't hide it behind the ActiveX window or make it smaller than the ActiveX window.

I don't know what events occur when you try to close an ActiveX window.
I never do that. Instead, I close the dialog window that the ActiveX window is on.

To understand your problem, I would need to get the ActiveX control and a sample program from you. Is this ActiveX control free?
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 focus issue

#14 Post by BruceN »

(Tried posting this earlier, but somehow it got lost in the inifnite bit bucket)

Correction to last post.... When the ocx (easyintegrator) is open I cannot close the dialog windows by any means (ok, cancel, clicking X). When I close the ocx, the dialog window is still open. Ideally, I'd like to have the dialog window hidden behind the ocx (I can easily resize it tobe small enough) and when the ocx is closed have that close the dialog as well. Is that possible? CAn the dialog window have knowledge of when the ocx closes?

thanks,
b
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 focus issue

#15 Post by BruceN »

Yes it is free. I'll whip up a simple sample for you and attach the ocx. look for it a little bit.

Requiring the dialog window to be closed would be confusing to our 'brain dead' users (which describes most of them) as the ocx has a close button on it.

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

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

Re: ActiveX focus issue

#16 Post by rdonnay »

Ok, now I understand.

I just need to figure out what event gets fired when that CLOSE button is clicked.
Then I can subscribe to that event and send another event to the parent window to tell it to close.
There are other workarounds that would probably work too but too much guessing.
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 focus issue

#17 Post by BruceN »

GREAT... I think we're finally understanding each other. For a while I felt like you were speaking French and I was speaking Swedish!

Atached is everything you need. The cipwin32.ocx needs to be registered with regsvr32. The xml file is the configuration for the ocx. It should work as is. Just put in in the working dir.

If you have any probs, post and I'll do what I can to provide the info.

thanks as always,

bruce

ps: do you ever get to the Tampa area? if so, I owe you a dinner!
donnay.zip
(1.61 MiB) Downloaded 822 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: ActiveX focus issue

#18 Post by BruceN »

further complications:

We experience sporatic screen drawing errors on some of the child windows the ocx creates over the main one. It seems to happen almost exclusively the first time we call the ocx after statting the app.

After spending an hour plus on the phone with their developer (Rubin) logged into my computer he feels that the problem is related to the fact that the ocx is dropped on a dialog wondow. When I used theo original native xbase code we never had the drawing issue (just te issue of it being behind the app windows).

Can the ocx be called without a window (that part I know can be done) and forced to be up front?

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: ActiveX focus issue

#19 Post by BruceN »

Forgot to put this in.. this is the code that works (except for focus issue)

procedure Call_CIPNET(cip_id)

Local oEasyIntegrator, ret_val:=.f., GetList[0], GetOptions
local SetupString:='',nVar:=1
local trans
local oCustfields
local oCustomer
local StringSavedCustomerRef:=''

SetupString:=GetCIPsetup(nVar)

if !(ValType(oEasyIntegrator)) == 'O'
oEasyIntegrator:=ActiveXObject():Create("cipwin32.EasyIntegrator")
endif

IF NIL == oEasyIntegrator // test to see if it got created
msgbox( "Error: " + Chr(13) + Chr(10) + "Description: " + ComLastMessage() )
//MsgBox( "Description:" + ComLastMessage() ) // show error message if not
RETURN //StringSavedCustomerRef
ENDIF

oEasyIntegrator:LoadSetup(SetupString)
trans := oEasyIntegrator:getProperty('TransFields')
oCustomer := oEasyIntegrator:getProperty('Customer')
oCustfields := oCustomer:getProperty('CustomerFields')
oEasyIntegrator:Customer:CustomerFields:Clear()
oCustfields:FirstName := fname //'G.C.'
oCustfields:LastName := lname //'Maxwell'
oCustfields:Company := cmpny //'E=mc2'
oCustomer:UpdatePayments(cip_id) // val(cip_id) )//'0') //43234 //50243
StringSavedCustomerRef = oEasyIntegrator:Customer:CustomerRef
cip_id := StringSavedCustomerRef
// msgbox(StringSavedCustomerRef)


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

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

Re: ActiveX focus issue

#20 Post by rdonnay »

I will create a sample program today and try to help you with your painting problems.

Some OCX controls behave differently than most.
I have never had a problem putting any other OCX on a dialog window in the past, but let me see what I can do. I have often seen better results when putting the OCX on an XbpStatic() which in turn is on a dialog window.
The eXpress train is coming - and it has more cars.

Post Reply