ActiveX focus issue
Posted: Tue Feb 02, 2010 7:43 am
I have an activeX control I call that pops an entry screen. When I call it, occasionally it pops as it should (on top). Most of the time it seems to be behind the main app (it shows on the task bar and can by clicked to bring forward).
I would think that there's a way to force it to be on top (It can't be truly modal as it has other screens it calls that go over it).
This is what creates it:
oEasyIntegrator:=ActiveXObject():Create("cipwin32.EasyIntegrator")
Looking thru the xbase board I found a series of posts between Roger and others on a similar issue and tried using that solution (from a bit less than a year ago)... but either it is a different scenario or I have the syntax wrong.
I've tried various permutations and combinations of the following ideas, but they all either crash or freeze at that point in the code.
//SetForegroundWindow(oEasyIntegrator:getHwnd())
// oEasyIntegrator:toFront()
//hWnd:=oEasyIntegrator:getHwnd()
//DLLFUNCTION SetForegroundWindow(hWnd) USING STDCALL FROM user32.dll
//SetForegroundWindow(oEasyIntegrator:getHwnd())
To be perfectly blunt - if you took everything I know about activeX (or most programming things for that matter) and shoved it up a gnat's ass, it would rattle around like a pea in a boxcar!
I would think that some of the above should do what I want, but I can't get the syntax or parameters right. As always, I turn to the 'oracles of all knowledge' for assistance.
thanks,
bruce
I would think that there's a way to force it to be on top (It can't be truly modal as it has other screens it calls that go over it).
This is what creates it:
oEasyIntegrator:=ActiveXObject():Create("cipwin32.EasyIntegrator")
Looking thru the xbase board I found a series of posts between Roger and others on a similar issue and tried using that solution (from a bit less than a year ago)... but either it is a different scenario or I have the syntax wrong.
I've tried various permutations and combinations of the following ideas, but they all either crash or freeze at that point in the code.
//SetForegroundWindow(oEasyIntegrator:getHwnd())
// oEasyIntegrator:toFront()
//hWnd:=oEasyIntegrator:getHwnd()
//DLLFUNCTION SetForegroundWindow(hWnd) USING STDCALL FROM user32.dll
//SetForegroundWindow(oEasyIntegrator:getHwnd())
To be perfectly blunt - if you took everything I know about activeX (or most programming things for that matter) and shoved it up a gnat's ass, it would rattle around like a pea in a boxcar!
I would think that some of the above should do what I want, but I can't get the syntax or parameters right. As always, I turn to the 'oracles of all knowledge' for assistance.
thanks,
bruce