FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to get Active Object in MDI app
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: How to get Active Object in MDI app
Posted: Thu Jul 15, 2010 02:13 AM
nageswaragunupudi wrote:Mr. Frances

This seems to be a much simpler solution. Can you please test and confirm if it works for you?
Code (fw): Select all Collapse
function ActiveControl()

   local oWnd := oWndFromHwnd( GetFocus() )

return If( oWnd:IsKindOf( 'TCONTROL' ), oWnd, nil )



Dear Mr. RAO,

On MDI app.. I have a runtime error on oWnd:IskidOf() "no exported method".. in dialog too.


Regards,
Frances
Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to get Active Object in MDI app
Posted: Thu Jul 15, 2010 06:40 AM
Frances,

Try it this way:
Code (fw): Select all Collapse
function ActiveControl()

   local oWnd := oWndFromHwnd( GetFocus() )

return If( oWnd != nil, If( oWnd:IsKindOf( 'TCONTROL' ), oWnd, nil ), nil )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: How to get Active Object in MDI app
Posted: Sat Jul 17, 2010 02:59 AM

Dear Mr. Antonio,

The modified control.prg has better results. I'll stick to it for a while..

Regards,
Frances

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15

Continue the discussion