How to return the focus for my application?

How to return the focus for my application?

Postby vilian » Wed Dec 19, 2007 3:43 pm

Hi,

When I call another application, I execute oDlg:Disable()

When to another application she is closed, I I execute oDlg:Enable and oDlg:SetFocus(), but my application does not receive the focus!
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Postby James Bott » Wed Dec 19, 2007 5:56 pm

Vilian,

Try:

setForeGroundWindow(hWnd)

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Antonio Linares » Wed Dec 19, 2007 6:49 pm

James missed the oDlg: (you could also try with the main oWnd)
SetForeGroundWindow(oDlg:hWnd)
regards, saludos

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

Postby vilian » Wed Dec 19, 2007 8:42 pm

Antonio,

Why when use oDlg:Disable(), exactly using later oDlg:Enable() clauses VALID of the GETS leaves to function?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Postby Antonio Linares » Wed Dec 19, 2007 9:14 pm

Vilian,

This test works fine:
Code: Select all  Expand view  RUN
#include "FiveWin.ch"

function Main()

   local oDlg, cTest := "hello world"

   DEFINE DIALOG oDlg

   @ 1, 2 GET cTest VALID ( MsgInfo( "ok" ), .T. )
   
   @ 3, 2 BUTTON "Disable" ACTION ( oDlg:Disable(), MsgInfo( "disabled" ), oDlg:Enable() )   

   ACTIVATE DIALOG oDlg CENTERED ;
      VALID MsgYesNo( "Want to end ?" )

return nil

Please provide a sample, thanks
regards, saludos

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

Postby vilian » Thu Dec 20, 2007 1:45 pm

Antonio,

I Sended for you e-mail.
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Postby vilian » Thu Dec 20, 2007 7:00 pm

Antonio,

You it received the Memory.zip archive?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Postby Antonio Linares » Thu Dec 20, 2007 11:45 pm

Vilian,

yes I got it, thanks, but had no time to review it yet
regards, saludos

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 38 guests