How to get Active Object in MDI app

Re: How to get Active Object in MDI app

Postby fraxzi » Thu Jul 15, 2010 2: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: Select all  Expand view
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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: How to get Active Object in MDI app

Postby Antonio Linares » Thu Jul 15, 2010 6:40 am

Frances,

Try it this way:
Code: Select all  Expand view

function ActiveControl()

   local oWnd := oWndFromHwnd( GetFocus() )

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: How to get Active Object in MDI app

Postby fraxzi » Sat Jul 17, 2010 2: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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Marc Venken, nageswaragunupudi and 63 guests