I've found this your code in this group.
Is it possible to set focus too?
This code show window but focus is not activated in program MyWin.
Is it possible?
Bye
Marco
- Code: Select all Expand view
- #include "Fivewin.ch"
FUNCTION MOSTRA()
LOCAL cTitle := "MyWin"
SHOWWINDOW( FINDWND( cTitle ), 9 )
SETFOREGROUNDWINDOW( FINDWND( cTitle ) )
RETURN NIL
#define GW_HWNDFIRST 0
#define GW_HWNDLAST 1
#define GW_HWNDNEXT 2
#define GW_HWNDPREV 3
#define GW_OWNER 4
#define GW_CHILD 5
FUNCTION FINDWND( cTitle )
LOCAL hWnd := GETWINDOW( GETDESKTOPWINDOW(), GW_CHILD )
WHILE hWnd != 0
IF UPPER( cTitle ) $ UPPER( GETWINDOWTEXT( hWnd ) )
RETURN hWnd
ENDIF
hWnd = GETWINDOW( hWnd, GW_HWNDNEXT )
ENDDO
RETURN NIL